#ifndef _IMAGE_TEXTURE_H_
#define _IMAGE_TEXTURE_H_

#include "ofConstants.h"
#include "ofGraphics.h"


class ofTexture {

	public :
		
		ofTexture();
		void allocate(int w, int h, int internalGlDataType);	 
		void clear();
		void loadData(unsigned char * data, int w, int h, int glDataType); 
		void loadScreenData(int x, int y, int w, int h);
		void draw(float x, float y, float w, float h);
		void draw(float x, float y);
		
		// these functions make life easier for classes that inherit
		// ofTexture, or people that want to get info out of ofTexture:
		
		// 				
		int 			textureTarget;
		
		int 			getTextureWidth(){ return tex_w; };
		int 			getTextureHeight(){ return tex_w; };
		int 			getWidth(){ return width; };
		int 			getHeight(){ return height; };
		float 			getTextureCoordT(){ return tex_t; };
		float 			getTextureCoordU(){ return tex_u; };
		unsigned int 	getTextureName(){ return texName[0]; }
		bool 			getFlipped(){ return bFlipTexture; };

	protected:		
		
		float 	offset_x, offset_y;
		float 	tex_t, tex_u;   
		int 	tex_w, tex_h;
		int 	width, height;		// 
		unsigned int texName[1];	
		bool bFlipTexture;  			// if we copy screen data & 0,0 top left;		
		// vs not happy with dynamic allocation of this...

}; 

#endif
