FontRenderer.h 632 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef FONTRENDERER_H
  2. #define FONTRENDERER_H
  3. #include <GL/glew.h>
  4. #include <array>
  5. #include "client/rendering/Texture.h"
  6. class FontRenderer final
  7. {
  8. public:
  9. FontRenderer();
  10. ~FontRenderer();
  11. FontRenderer(const FontRenderer& other) = delete;
  12. FontRenderer(FontRenderer&& other) = delete;
  13. FontRenderer& operator=(const FontRenderer& other) = delete;
  14. FontRenderer& operator=(FontRenderer&& other) = delete;
  15. void drawString(float x, float y, const char* text);
  16. private:
  17. Texture tex;
  18. static const size_t BUFFER_LENGTH;
  19. size_t offset;
  20. GLuint vba;
  21. GLuint vbo;
  22. };
  23. #endif