Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct VertexData
- {
- math::Vec3 position;
- math::Vec3 color;
- };
- class SpriteBatchRenderer
- {
- private:
- GLuint VAO, VBO, IBO;
- //GLchar flags;
- ResourcesManager* resman;
- Shader* shader;
- VertexData* buffer_pointer = nullptr;
- GLuint num_sprites;
- public:
- SpriteBatchRenderer();
- GLboolean Init(ResourcesManager &res, char bits, GLuint max_sprites, Shader* override_shader = nullptr);
- GLvoid Begin();
- GLvoid Submit(math::Vec3 &pos, math::Vec2 &dims, math::Vec3 &col);
- GLvoid End();
- GLvoid Render();
- };
Advertisement
Add Comment
Please, Sign In to add comment