123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef RENDERER_H
- #define RENDERER_H
- #include "rendering/wrapper/Shader.h"
- #include "rendering/WindowSize.h"
- #include "math/MatrixStack.h"
- #include "rendering/FontRenderer.h"
- class Renderer final {
- public:
- Renderer(const WindowSize& size, Shader& shader);
- void pop();
- void push();
- void update();
- Renderer& scale(float sx, float sy);
- Renderer& scale(float s);
- Renderer& translate(float tx, float ty);
- Renderer& translateX(float tx);
- Renderer& translateY(float ty);
- Renderer& translateTo(float tx, float ty);
- Renderer& rotate(float degrees);
- void drawString(float x, float y, const char* text);
- private:
- void setTextureMode(bool b);
- void setColorMode(bool b);
-
- const WindowSize& size;
- Shader& shader;
- bool texture;
- bool color;
- MatrixStack stack;
- FontRenderer fontRenderer;
- };
- #endif
|