render.h (559B)
1 #define RENDER_QUEUE_SIZE 512 2 3 enum RenderLayer 4 { 5 RENDER_LAYER_TILES, 6 RENDER_LAYER_PLAYER, 7 RENDER_LAYER_DEBUG, 8 9 NUM_RENDER_LAYERS, 10 }; 11 12 // TODO: optimize packing 13 struct RenderJob 14 { 15 GLuint ebo; 16 v3 color; 17 m4 model; 18 f32 tex_interp; 19 u8 tile_id; 20 enum RenderLayer layer; 21 }; 22 23 struct RendererState 24 { 25 GLuint vao; 26 GLuint quad_vbo; 27 GLuint quad_ebo; 28 GLuint rect_ebo; 29 m4 projection; 30 m4 view; 31 struct Shader shader; 32 struct RenderJob *queue; 33 size_t queue_count; 34 bool scissor_test_is_disabled; 35 };