-
Notifications
You must be signed in to change notification settings - Fork 0
/
graphics.h
69 lines (51 loc) · 2.04 KB
/
graphics.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
#ifndef INC_GRAPHICS_H
#define INC_GRAPHICS_H
/*
#ifndef GL_FRAMEWORK__INCLUDED
#define GL_FRAMEWORK__INCLUDED
*/
#include <windows.h> // Header File For Windows
typedef struct { // Structure For Keyboard Stuff
bool keyDown [256]; // Holds TRUE / FALSE For Each Key
} Keys; // Keys
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
Keys* keys; // Key Structure
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
void TerminateApplication(GL_Window* window); // Terminate The Application
void ToggleFullscreen(GL_Window* window); // Toggle Fullscreen / Windowed Mode
// These Are The Function You Must Provide
BOOL Initialize(GL_Window* window, Keys* keys); // Performs All Your Initialization
void Deinitialize(void); // Performs All Your DeInitialization
void Progress(double time); // Perform Motion Updates
void Draw(void); // Perform All Your Scene Drawing
/*
void RotateCamera(int x, int y);
void MoveCamera(int x, int y);
void Zoom(int d);
*/
void MouseLeftDown();
void MouseLeftUp();
void MouseRightDown();
void MouseRightUp();
void MouseMove(int nx, int ny);
void MouseWheel(int d);
void ChangeScreen(int x, int y);
#endif