#ifndef __Texture_Header_File__
#define __Texture_Header_File__

#ifdef WIN32
#include <windows.h>
#endif

#include <string>

#define VMATH_NAMESPACE vam
#include "vmath.h"
#include <GL/gl.h>

#include "image.h"

namespace vam
{

	class Texture
	{
	public:
		Texture():tex((unsigned)-1){}
		static Texture fromImage(TGAImg& img);
		static Texture fromFile(std::string fileName);
		static Texture fromData(unsigned w, unsigned h, unsigned char* data);

		void bind(){ glBindTexture(GL_TEXTURE_2D, tex); }
	protected:
		Texture(GLuint t):tex(t){}
	private:
		GLuint tex;
	};

} // end of namespace


#endif //__Texture_Header_File__

