// BaseGL.h: interface for the BaseGL class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BASEGL_H__87727076_2CED_46D0_AC06_E3B442C6909E__INCLUDED_)
#define AFX_BASEGL_H__87727076_2CED_46D0_AC06_E3B442C6909E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define GL_GLEXT_PROTOTYPES

#include <windows.h>
#include <time.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glaux.h>		// Header File For The Glaux Library

#include "Mouse.h"
#include "Camera.h"

LRESULT	CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);	// Declaration For WndProc

class BaseGL  
{
public:
	BaseGL(int w, int h, int b);
	BaseGL();
	virtual ~BaseGL();

	bool					Init(int argc, char **argv);
	void					MainLoop();

	int					m_argc;
	char					**m_argv;


private:
	void					Loading();
	void					Drawing();
	void					ProceedKeys();
	void					ProceedMouse();
	void					Reshape(int w, int h);
	void					CreateMouseInterface();
	void					BuildWindow();
	void					KillWindow();
	void					InitGL();	//Called by InitGL

	bool					m_finished;
	HDC					m_hDC;			// Private GDI Device Context
	HGLRC					m_hRC;			// Permanent Rendering Context
	HWND					m_hWnd;			// Holds Our Window Handle
	MSG					m_msg;
	HINSTANCE			m_hInstance;// Holds The Instance Of The Application

	Camera				m_camera;
	Mouse					m_Mouse;
	static int			m_lastX;
	static int			m_lastY;
	static float		m_farPlane;
	static float		m_nearPlane;
	static float		m_fov;
	static bool			m_keys[256];
	static bool			m_fullScrn;
	static int			m_height;
	static int			m_width;
	static int			m_bits;
	float					light_pos[4];
	bool					rendermesh;
};

#endif // !defined(AFX_BASEGL_H__87727076_2CED_46D0_AC06_E3B442C6909E__INCLUDED_)
