diff options
Diffstat (limited to 'Project/Renderer.h')
-rw-r--r-- | Project/Renderer.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Project/Renderer.h b/Project/Renderer.h new file mode 100644 index 0000000..29b5bf8 --- /dev/null +++ b/Project/Renderer.h @@ -0,0 +1,25 @@ +#pragma once + +#include <GL/glew.h> +#include <GL/glu.h> +#include <GLFW/glfw3.h> + +#include "VertexArray.h" +#include "IndexBuffer.h" +#include "Shader.h" + +#define ASSERT(x) if (!(x)) __debugbreak(); +#define GLCall(x) GLClearError();\ + x;\ + ASSERT(GLCheckError()) + +void GLClearError(); +bool GLCheckError(); + +class Renderer +{ +public: + void Draw(const VertexArray& va, const IndexBuffer& ib, const Shader& shader) const; + void Clear(); + void Ortho2D(float* mat, float left, float right, float bottom, float top); +};
\ No newline at end of file |