12345678910111213141516171819202122232425262728293031 |
- #ifndef FONTRENDERER_H
- #define FONTRENDERER_H
- #include <GL/glew.h>
- #include <array>
- #include "client/rendering/Texture.h"
- class FontRenderer final
- {
- public:
- FontRenderer();
- ~FontRenderer();
-
- FontRenderer(const FontRenderer& other) = delete;
- FontRenderer(FontRenderer&& other) = delete;
- FontRenderer& operator=(const FontRenderer& other) = delete;
- FontRenderer& operator=(FontRenderer&& other) = delete;
-
- void drawString(float x, float y, const char* text);
-
- private:
- Texture tex;
- static const size_t BUFFER_LENGTH;
- size_t offset;
-
- GLuint vba;
- GLuint vbo;
- };
- #endif
|