Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum DrawMode
- {
- IMMEDIATE = 0,
- TEXTURE
- };
- class SpriteBatch
- {
- public:
- SpriteBatch();
- ~SpriteBatch();
- void Begin(DrawMode mode=IMMEDIATE);
- void End();
- void Draw(Texture2D* texture, Vector2 position, float rotation=0.f, Vector2 scale=Vector2::One(), Vector2 origin=Vector2::Zero(), Colour colour=Colour::White(), float depth=0.f);
- void DrawString(SpriteFont* font, Vector2 position, float rotation=0.f, Vector2 scale=Vector2::One(), Vector2 origin=Vector2::Zero(), Colour colour=Colour::White(), float depth=0.f);
- private:
- GLfloat m_quadVertices[18];
- GLfloat m_quadTexCoords[12];
- GLuint m_quadVBOVertices;
- GLuint m_quadVBOTexCoords;
- void Draw();
- };
Add Comment
Please, Sign In to add comment