blob: 29b5bf83f803ee4b94188afafa1ffa2d0fdd50dc (
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
|
#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);
};
|