-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOGL_Render.h
More file actions
38 lines (29 loc) · 963 Bytes
/
Copy pathOGL_Render.h
File metadata and controls
38 lines (29 loc) · 963 Bytes
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
28
29
30
31
32
33
34
35
36
37
38
#include <GLEW/glew.h>
#include <GLFW/glfw3.h>
class World;
class Renderer
{
World* m_World;
float m_Zoom = 1.0;
const char* m_Title;
const unsigned int m_SW, m_SH;
unsigned int VaID, VbID, SpID;
double pDeltaTime = 0.0f, pLastTime = 0.0f, pThisTime = 0.0;
int* PolyCount;
float* RenderData;
int RenderDataPoints = 0;
void _OGL_Init();
public:
GLFWwindow* m_Window;
bool IS_RUNNING = true;
Renderer(const char* Title = "OGL2d", const GLuint SW = 800, const GLuint SH = 800, int RenderBuffer = 512, int PolyCount = 64);
static void fKeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);
static void fCursorCallback(GLFWwindow* window, double xPos, double yPos);
void fKeyHandleInput(int key, int scancode, int action, int mods);
void fCursorHandleInput(double xPos, double yPos);
void fLoadWorld(World* world);
void fClear();
void fRender();
void fClose();
~Renderer();
};