FontRenderer.h 474 B

123456789101112131415161718192021
  1. #ifndef FONTRENDERER_H
  2. #define FONTRENDERER_H
  3. #include "gaming-core/rendering/FileTexture.h"
  4. #include "gaming-core/rendering/VertexBuffer.h"
  5. #include "gaming-core/utils/Color.h"
  6. class FontRenderer final {
  7. static constexpr int MAX_CHARS = 256;
  8. static constexpr int VERTEX_SIZE = 4 * sizeof(float) + sizeof(Color4);
  9. VertexBuffer vertexBuffer;
  10. FileTexture tex;
  11. public:
  12. FontRenderer();
  13. void drawString(float x, float y, const char* text);
  14. };
  15. #endif