Untitled Game engine no.5
1.0
|
4 #include "Renderer.hpp"
6 #include "RenderTag.hpp"
29 void Clear()
override;
51 void AddTag(
const std::string& name,
RenderTag tag, ViewProjection projection = ViewProjection::PROJECTION)
override;
56 void Flush()
override;
60 static const size_t MaxQuadCount = 1000;
62 static const size_t MaxVertexCount = MaxQuadCount * 4;
64 static const size_t MaxIndexCount = MaxQuadCount * 6;
66 static const uint8_t MaxTags = 32;
69 GLenum GLDrawTypeFromDrawType(DrawType d);
74 std::vector<Ref<Texture>> boundTextures;
77 std::vector<std::string> m_order;
78 std::unordered_map<std::string, std::vector<Vertex>> m_Vertices;
80 std::unordered_map<std::string, RenderTag> m_Tags;
81 std::unordered_map<std::string, ViewProjection> m_View;
83 uint32_t m_Indices[MaxIndexCount]{};
void Init() override
sets up the renderer
Definition: GLRenderer.cpp:21
void Flush() override
Definition: GLRenderer.cpp:145
void Shutdown() override
Shutdown the render api.
Definition: GLRenderer.cpp:60
std::shared_ptr< T > Ref
Has stuff for making references a lot more easily shared smart pointer.
Definition: Base.hpp:21
void Submit(const std::string &tag, const Ref< Transform > &transform, const Ref< MeshRenderer > &renderer) override
Definition: GLRenderer.cpp:109
void SetClearColor(uint32_t c) override
Definition: GLRenderer.cpp:64
Definition: RenderTag.hpp:31
void AddTag(const std::string &name, RenderTag tag, ViewProjection projection=ViewProjection::PROJECTION) override
Adds a rendering step to the Flush cycle.
Definition: GLRenderer.cpp:77
Definition: Animation.hpp:14
~GLRenderer()
Destructor.
Definition: GLRenderer.cpp:19
Definition: GLRenderer.hpp:12
void Clear() override
Clear the screen.
Definition: GLRenderer.cpp:73
float AddTexture(const Ref< Texture > &texture)
Definition: GLRenderer.cpp:252
Definition: Renderer.hpp:15