
#ifndef _CSURFACE
#define _CSURFACE

#include "core.h"

	class CSurface
	{
	public:
		char *data;
		short xdim,ydim;
		int size;
		char depth;
		char channels;
		float transparency;

		unsigned int	GLIndex;

		//CONSTRUCTORS
		CSurface();
		CSurface(int width,int height,int cdepth);
		~CSurface();

		//METHODS
		void Draw(float x,float y,float r,float g,float b);
		void Draw(float x,float y,float z,float r,float g,float b);
		void draw(float x,float y,float z,float alpha);
		void draw(float x,float y,float z);
		void CSurface::drawflat(float x,float y,float z,float xsiz,float ysiz,float alpha);
		void draw(float x,float y,float z,float rx,float ry,float rz,float sx,float sy,float sz);
		void drawRect(float x1,float x2,float y1,float y2,float r,float g,float b,float a);
		void DrawAsBackground();
		void LoadTGA(char *filename);
		void CSurface::LoadTGARAR(char *filename);
		void Bind(unsigned int index);
		void BindToUse();
		void Update(int index);	//faster mem->card hw update

	private:
	};


#endif _CSURFACE