
/************************************************
 **
 **		Just to make code more readable,
 **     i've moved most of the glut update
 **     functions to in here, plus some others.
 **
 ************************************************/

#ifndef _WRAPGLUT
#define _WRAPGLUT

class CSurface;

#include "include/glut.h"

	extern bool paused;
	extern int rendering;
	extern int window;

	extern float frames;
	extern GLuint texture[200];

	//Functions in this .h:

	void initGLTweaks();								//Changes GL rendering state
	void Reshape(int width, int height);				//Called automagically when window resized
	void update(int value);								//Called at constant rate to blit to screen
	void Key(unsigned char key, int x, int y);   //Called automagically when keypressed
	int initGL(unsigned int mode,int width,int height,int x,int y,char *title,char fullscreen);

	unsigned int GetFreeTextureIndex();
	void MapTexture(GLuint index,CSurface *s);

	void textwrite(int x, int y, char *string,float r,float g,float b);
	void screenClear(float percent,int buffers);

#endif _WRAPGLUT