blob: 59b88ff8060fd418a876fd1e74a0d92727f4806e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#pragma once
#include <GL/glew.h>
#include <GL/glu.h>
#include <GLFW/glfw3.h>
#include "VertexArray.h"
#include "IndexBuffer.h"
#include "Shader.h"
#ifdef _MSC_VER
#define ASSERT(x) if (!(x)) __debugbreak();
#endif //_MSC_VER
#define GLCall(x) GLClearError();\
x;\
wxASSERT(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);
};
|