-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenGL.h
99 lines (73 loc) · 2.62 KB
/
OpenGL.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#pragma once
#pragma comment( lib, "opengl32.lib" )
#pragma comment( lib, "glew32.lib")
#pragma comment( lib, "glu32.lib" )
#pragma comment( lib, "vfw32.lib" )
#include <stdarg.h>
#include "stdafx.h"
#include "resource.h"
#include "OpenGLRender.h"
#include "TerrainManager.h"
#include "TerrainGen.h"
#include "Camera.h"
#include "Actor.h"
#include "ActorManager.h"
#include "GameManager.h"
//TerrainGen *world;
OpenGLRender *glRender;
TerrainManager *terrainManager;
//TerrainGen *world;
ActorManager *actorManager;
GameManager *gameManager;
Camera *camera; //Camera object that holds orientation values for camera
bool keys[256]; // Keyboard routines
int selectedID; //Object ID selected by the user
GLvoid ResizeGLScene(GLsizei, GLsizei);
GLvoid KillGLWindow(GLvoid);
//int DrawGLScene(GLvoid);
void glPrint(const char *);
//void checkLighting(bool lightSwitch);
//void overlayDisplay();
void loadTexture(string path, int index);
//void drawTerrainAsList();
//void rasterStringToOverlay(string str);
void loadTextures();
typedef struct { // Contains Information Vital To Applications
HINSTANCE* hInstance; // Application Instance
const char* className; // Application ClassName
} Application; // Application
typedef struct { // Window Creation Info
Application* application; // Application Structure
char* title; // Window Title
int width; // Width
int height; // Height
int bitsPerPixel; // Bits Per Pixel
BOOL isFullScreen; // FullScreen?
} GL_WindowInit; // GL_WindowInit
typedef struct { // Contains Information Vital To A Window
HWND hWnd; // Window Handle
HDC hDC; // Device Context
HGLRC hRC; // Rendering Context
GL_WindowInit init; // Window Init
BOOL isVisible; // Window Visible?
DWORD lastTickCount; // Tick Counter
} GL_Window; // GL_Window
GL_Window window;
GLuint *fonts;
//Keys* g_keys;
void buildFont(GLuint &list, LPCWSTR fontName, int size);
//void perspective();
void TerminateApplication (); // Terminate The Application
void ToggleFullscreen (); // Toggle Fullscreen / Windowed Mode
BOOL RegisterWindowClass(Application * application);
BOOL CreateWindowGL();
BOOL DestroyWindowGL();
// These Are The Function You Must Provide
void Deinitialize (void); // Performs All Your DeInitialization
void Draw (void); // Perform All Your Scene Drawing
void rMouseSelection(); // Perform Selection
void lMouseSelection();
void ReshapeGL(int width, int height);
void clearCurrentSelection();
extern int mouse_x;
extern int mouse_y;