/* * File: Textura.h * Author: hugo * * Created on 11 de Dezembro de 2009, 14:49 */ #ifndef _TEXTURA_H #define _TEXTURA_H #include #include class Textura { public: Textura(int largura,int altura); Textura() : largura(4),altura(4),texturaIniciada(false){} Textura(const Textura& orig); Textura & iniciarTextura(); Textura & alocarMatriz(); Textura & iniciarMapeamento(); Textura & mapearPrimeiroPonto(float x,float y,float z); Textura & mapearSegundoPonto(float x,float y,float z); Textura & mapearTerceiroPonto(float x,float y,float z); Textura & mapearQuartoPonto(float x,float y,float z); Textura & finalizarMapeamento(); Textura & setarCorVermelho(int i, int x, GLubyte valor); Textura & setarCorVerde(int i, int x, GLubyte valor); Textura & setarCorAzul(int i, int x, GLubyte valor); Textura & setarCorAlpha(int i, int x, GLubyte valor); Textura & setLargura(int valor){ largura = valor; return *this; } Textura & setAltura(int valor){ altura = valor; return *this; } int getAltura(){ return altura; } int getLargura(){ return largura; } static bool habilitado; virtual ~Textura(); private: enum Cor { R,G,B,A }; Textura & setarCor(int i,int x, Cor cor, GLubyte valor ); bool texturaIniciada; GLuint nome; int largura,altura; std::auto_ptr textura; }; #endif /* _TEXTURA_H */