-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenGLRender.h
72 lines (55 loc) · 1.95 KB
/
OpenGLRender.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#pragma once
#pragma comment( lib, "opengl32.lib" )
#pragma comment( lib, "glu32.lib" )
#pragma comment( lib, "vfw32.lib" )
#include "stdafx.h"
#include "Camera.h"
#include "ActorManager.h"
#include "TerrainManager.h"
#include "GameManager.h"
#include "Simple OpenGL Image Library\src\SOIL.h"
class OpenGLRender
{
public:
Vector3 target; // Location of user clicks
int clickWait; //Time to wait before another click is accepted
int clickWaitTotal; //Total time to wait before another click is accepted
//Object variables
Camera *cam;
ActorManager *aM;
TerrainManager *tM;
GameManager *gM;
BOOL initialize (Vector2* windowSize); // Performs All Your Initialization
BOOL update (DWORD milliseconds, int mouseX, int mouseY);// Perform Motion Updates
void perspective();
int drawGLScene();
OpenGLRender(Camera &c, ActorManager &a, TerrainManager &t, GameManager &g, GLuint &fSet);
~OpenGLRender(void);
private:
int screenH, screenW; //User screen width and height
int mouseX, mouseY; //Mouse location
//Debug display variables
bool debug, debugP;
double drawX, drawY;
int overlayLineCount;
int fpsUpdate, time;
bool active; // Flag sets window to be active by default
bool fullscreen; // Flag sets window to be fullscreen by default
bool light, lp, fp;
//Texture Variables
GLuint testTex[7]; //Array for holding OpenGL textures
GLuint *fontSet; //Holds the OpenGL font data
int cursorTex;
GLuint terrainList; //Terrain Display List
void overlayDisplay();
void rasterStringToOverlay(int type, string str);
void rasterStringTo3DOverlay(Vector3 location, int type, string *str);
void fastDrawTerrain();
void drawTerrain();
void checkLighting(bool lightSwitch);
void toggleLighting(bool lighting);
void toggleDebug(bool debug);
void loadTexture(string path, int index);
void loadTextures();
void glPrint(int type, const char *fmt);
};