2017-11-10 18:27:39 +00:00
|
|
|
/*
|
|
|
|
* Mr. 4th Dimention - Allen Webster
|
|
|
|
*
|
|
|
|
* 10.11.2017
|
|
|
|
*
|
|
|
|
* Format for 4coder render commands.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
// TOP
|
|
|
|
|
2018-03-24 21:43:57 +00:00
|
|
|
#if !defined(FRED_RENDER_FORMAT_H)
|
|
|
|
#define FRED_RENDER_FORMAT_H
|
|
|
|
|
2017-11-11 00:58:47 +00:00
|
|
|
enum Render_Command_Type{
|
|
|
|
RenCom_Rectangle,
|
|
|
|
RenCom_Outline,
|
|
|
|
RenCom_Glyph,
|
2017-11-20 00:47:55 +00:00
|
|
|
RenCom_ChangeClip,
|
2017-11-10 18:27:39 +00:00
|
|
|
};
|
|
|
|
|
2017-11-11 00:58:47 +00:00
|
|
|
struct Render_Command_Header{
|
2017-11-20 00:47:55 +00:00
|
|
|
union{
|
|
|
|
struct{
|
|
|
|
i32 size;
|
|
|
|
i32 type;
|
|
|
|
};
|
|
|
|
u64 force_8_byte_align_;
|
|
|
|
};
|
2017-11-10 18:27:39 +00:00
|
|
|
};
|
|
|
|
|
2017-11-11 00:58:47 +00:00
|
|
|
struct Render_Command_Rectangle{
|
|
|
|
Render_Command_Header header;
|
2017-11-10 18:27:39 +00:00
|
|
|
f32_Rect rect;
|
|
|
|
u32 color;
|
|
|
|
};
|
|
|
|
|
2017-11-11 00:58:47 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2017-11-11 00:58:47 +00:00
|
|
|
struct Render_Command_Glyph{
|
|
|
|
Render_Command_Header header;
|
2017-11-10 18:27:39 +00:00
|
|
|
Vec2 pos;
|
|
|
|
u32 color;
|
2017-11-20 23:31:57 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
|
2017-11-11 00:58:47 +00:00
|
|
|
struct Render_Command_Change_Clip{
|
|
|
|
Render_Command_Header header;
|
2017-11-10 18:27:39 +00:00
|
|
|
i32_Rect box;
|
|
|
|
};
|
|
|
|
|
2017-11-20 00:47:55 +00:00
|
|
|
struct Render_Pseudo_Command_Free_Texture{
|
|
|
|
Render_Command_Header header;
|
|
|
|
Render_Free_Texture free_texture_node;
|
|
|
|
};
|
|
|
|
|
2018-03-24 21:43:57 +00:00
|
|
|
#endif
|
|
|
|
|
2017-11-10 18:27:39 +00:00
|
|
|
// BOTTOM
|
|
|
|
|