#pragma once #include "types.h" #include "Shader.h" #include "mathlib.h" struct OrthographicRenderer { Mat4x4 projection; uint32 shader; struct { int32 position; int32 color; } attributes; struct { int32 projection; int32 model; } uniforms; void load(); void render(); void unload(); }; struct OrthographicVertex { Vector2 position; Vector2 color; }; template struct OrthographicShape { uint32 vao; uint32 vbo; OrthographicVertex vertices[N]; Mat4x4 model; void load(OrthographicRenderer* renderer); void render(OrthographicRenderer* renderer); void unload(); };