4coder/code/4ed_render_target.h

77 lines
1.3 KiB
C
Raw Normal View History

2017-11-10 18:27:39 +00:00
/*
* 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;
};
2019-07-25 07:17:01 +00:00
struct Render_Vertex{
2019-10-08 19:02:04 +00:00
Vec2_f32 xy;
Vec3_f32 uvw;
u32 color;
f32 half_thickness;
2019-07-25 07:17:01 +00:00
};
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;
2019-07-25 07:17:01 +00:00
};
2017-11-10 18:27:39 +00:00
struct Render_Target{
2019-02-25 23:42:13 +00:00
b8 clip_all;
2019-02-24 07:22:16 +00:00
i32 width;
i32 height;
2017-11-10 18:27:39 +00:00
i32 bound_texture;
u32 color;
2019-02-25 23:42:13 +00:00
i32 frame_index;
f32 literal_dt;
f32 animation_dt;
2019-02-24 07:22:16 +00:00
Render_Free_Texture *free_texture_first;
Render_Free_Texture *free_texture_last;
2019-07-25 07:17:01 +00:00
Arena arena;
Render_Group *group_first;
Render_Group *group_last;
i32 group_count;
2019-07-25 07:17:01 +00:00
Face_ID current_face_id;
Rect_f32 current_clip_box;
void *font_set;
2019-07-25 07:17:01 +00:00
u32 fallback_texture_id;
2017-11-10 18:27:39 +00:00
};
#endif
// BOTTOM