#ifndef _MAIN_H
#define _MAIN_H


#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <gl\gl.h>                                     // Header File For The OpenGL32 Library
#include <gl\glu.h>                                        // Header File For The GLu32 Library
#include <string>                                      // Used for our STL string objects
#include <fstream>                                     // Used for our ifstream object to load text files
using namespace std;

#include "CShader.h"

#define SCREEN_WIDTH 800                              // We want our screen width 800 pixels
#define SCREEN_HEIGHT 600                             // We want our screen height 600 pixels
#define SCREEN_DEPTH 16                                   // We want 16 bits per pixel

extern bool  g_bFullScreen;                              // Set full screen as default
extern HWND  g_hWnd;                                 // This is the handle for the window
extern RECT  g_rRect;                                    // This holds the window dimensions
extern HDC   g_hDC;                                     // General HDC - (handle to device context)
extern HGLRC g_hRC;                                       // General OpenGL_DC - Our Rendering Context for OpenGL
extern HINSTANCE g_hInstance;                         // This holds our window hInstance

// This is our MAIN() for windows
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hprev, PSTR cmdline, int ishow);

// The window proc which handles all of window's messages.
LRESULT CALLBACK WinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);

// This controls our main program loop
WPARAM MainLoop();

// This changes the screen to full screen mode
void ChangeToFullScreen();

// This is our own function that makes creating a window modular and easy
HWND CreateMyWindow(LPSTR strWindowName, int width, int height, DWORD dwStyle, bool bFullScreen, HINSTANCE hInstance);

// This allows us to configure our window for OpenGL and back buffering
bool bSetupPixelFormat(HDC hdc);

// This inits our screen translations and projections
void SizeOpenGLScreen(int width, int height);

// This sets up OpenGL
void InitializeOpenGL(int width, int height);

// This initializes the whole program
void Init(HWND hWnd);

// This draws everything to the screen
void RenderScene();

// This frees all our memory in our program
void DeInit();

#endif 


/////////////////////////////////////////////////////////////////////////////////
//
// * QUICK NOTES * 
//
// We added an include for CShader.h to this file.  <fstream> and <string> also
// was added.
// 
// 
// © 2000-2005 GameTutorials