/* date = May 7th 2023 9:49 am */ #ifndef OPENGL_RENDER_H #define OPENGL_RENDER_H #include "opengl_defines.h" #include "generated/opengl_functions.meta.h" struct opengl_texture { u32 ID; render_texture_format Format; v2_s32 Dim; }; struct quad_program { u32 ID; u32 PID; u32 SourcePID; u32 TextureIndexID; u32 ColorID; u32 ToCenterID; u32 HalfSizeID; u32 CornerRadiusID; u32 EdgeSoftnessID; u32 BorderThicknessID; u32 UniformResolutionLocation; }; struct instanced_quad_program { u32 ID; u32 DestID; u32 SourceID; u32 TextureIndexID; u32 ColorID[4]; u32 CornerRadiusID[4]; u32 EdgeSoftnessID; u32 BorderThicknessID; u32 UniformResolutionLocation; }; struct opengl_context { #if VN_USE_INSTANCING u32 InstancedQuadBuffer; instanced_quad_program InstancedQuadProgram; #else u32 VertexBuffer; u32 IndexBuffer; quad_program QuadProgram; #endif }; #endif //OPENGL_RENDER_H