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


#if !defined(AFX_OGLRENDRER_H__EAAD26C0_8EC5_43C5_8A73_AFB83D09BC0E__INCLUDED_)
#define AFX_OGLRENDRER_H__EAAD26C0_8EC5_43C5_8A73_AFB83D09BC0E__INCLUDED_

#include "Platf_gl.h"

#include <vector>
using std::vector;

class Camera;

class OGLrendrer  
{
public:
	OGLrendrer();
	void initGL();
	void startFrame();
	virtual void endFrame() = 0;
	GLuint getList();
	void startList(GLuint dlHand);
	void endList();
	void drawList(GLuint dlHand);
	void resize(unsigned int x, unsigned int y);
	void loadtexture();
	void loadtex2();
	void loadtex3();
	void loadlightmap();
	unsigned int loadPngTex(char *fileName);
	unsigned int loadRawTex(char *fileName, unsigned int width, unsigned int height, unsigned int channels);
	virtual ~OGLrendrer();
	void setCamera(Camera *cam);
	virtual void loadTexture(char *fileName, void **buffer) = 0;
	virtual void *getGlProcAddress(char *symbolName) = 0;
	virtual bool cached();
	void loadCrosshair();
	void invalidateCache();
	void paintCrosshair();
private:
	vector<GLuint> textures;
	Camera *mainCam;
	bool DLCached;
protected:

};

#endif // !defined(AFX_OGLRENDRER_H__EAAD26C0_8EC5_43C5_8A73_AFB83D09BC0E__INCLUDED_)
