FontRenderer.h 440 B

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