4coder/4ed_render_format.h

68 lines
1.0 KiB
C
Raw Normal View History

2017-11-10 18:27:39 +00:00
/*
* Mr. 4th Dimention - Allen Webster
*
* 10.11.2017
*
* Format for 4coder render commands.
*
*/
// TOP
#if !defined(FRED_RENDER_FORMAT_H)
#define FRED_RENDER_FORMAT_H
enum Render_Command_Type{
RenCom_Rectangle,
RenCom_Outline,
RenCom_Glyph,
RenCom_ChangeClip,
2017-11-10 18:27:39 +00:00
};
struct Render_Command_Header{
union{
struct{
i32 size;
i32 type;
};
u64 force_8_byte_align_;
};
2017-11-10 18:27:39 +00:00
};
struct Render_Command_Rectangle{
Render_Command_Header header;
2017-11-10 18:27:39 +00:00
f32_Rect rect;
u32 color;
};
struct Render_Command_Gradient{
Render_Command_Header header;
2017-11-10 18:27:39 +00:00
f32_Rect rect;
u32 left_color;
u32 right_color;
};
struct Render_Command_Glyph{
Render_Command_Header header;
2017-11-10 18:27:39 +00:00
Vec2 pos;
u32 color;
Face_ID font_id;
2017-11-10 18:27:39 +00:00
u32 codepoint;
2019-01-25 21:03:52 +00:00
u32 flags;
2017-11-10 18:27:39 +00:00
};
struct Render_Command_Change_Clip{
Render_Command_Header header;
2017-11-10 18:27:39 +00:00
i32_Rect box;
};
struct Render_Pseudo_Command_Free_Texture{
Render_Command_Header header;
Render_Free_Texture free_texture_node;
};
#endif
2017-11-10 18:27:39 +00:00
// BOTTOM