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
|
#ifndef MAIN_H
#define MAIN_H
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "glu32.lib")
#pragma comment(lib, "glaux.lib")
#pragma comment(lib, "SOIL.lib")
#pragma comment(linker, "/subsystem:windows")
#include "socket.h"
#include <Windows.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include "SOIL.h"
/*************************** Constants and Macros ***************************/
#define WND_CLASS_NAME "OpenGL Window Class"
/******************************** Globals ********************************/
HDC hdc;
HGLRC hrc;
HWND hWnd;
HINSTANCE hInstance;
int lfTime, currentTime;
bool keys[256];
/******************************** Prototypes ********************************/
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd);
LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
BOOL SetupWindow(const char *title, int width, int height, int bits);
void ResizeScene(GLsizei width, GLsizei height);
BOOL InitializeScene();
void LoadTextures();
void Calculate();
void DisplayScene();
void KillWindow();
/******************************** Load Textures ********************************/
GLuint playerTex, groundTex;
#endif MAIN_H
|