forked from 4coder-archive/4coder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
4ed_render_target.h
76 lines (61 loc) · 1.25 KB
/
4ed_render_target.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* Mr. 4th Dimention - Allen Webster
*
* 10.11.2017
*
* Render target type definition
*
*/
// TOP
#if !defined(FRED_RENDER_TARGET_H)
#define FRED_RENDER_TARGET_H
struct Render_Free_Texture{
Render_Free_Texture *next;
u32 tex_id;
};
struct Render_Vertex{
Vec2_f32 xy;
Vec3_f32 uvw;
u32 color;
f32 half_thickness;
};
struct Render_Vertex_Array_Node{
Render_Vertex_Array_Node *next;
Render_Vertex *vertices;
i32 vertex_count;
i32 vertex_max;
};
struct Render_Vertex_List{
Render_Vertex_Array_Node *first;
Render_Vertex_Array_Node *last;
i32 vertex_count;
};
struct Render_Group{
Render_Group *next;
Render_Vertex_List vertex_list;
// parameters
Face_ID face_id;
Rect_f32 clip_box;
};
struct Render_Target{
b8 clip_all;
i32 width;
i32 height;
i32 bound_texture;
u32 color;
i32 frame_index;
f32 literal_dt;
f32 animation_dt;
Render_Free_Texture *free_texture_first;
Render_Free_Texture *free_texture_last;
Arena arena;
Render_Group *group_first;
Render_Group *group_last;
i32 group_count;
Face_ID current_face_id;
Rect_f32 current_clip_box;
void *font_set;
u32 fallback_texture_id;
};
#endif
// BOTTOM