#ifndef DEF_TEXTURE #define DEF_TEXTURE // Include Windows #ifdef WIN32 #include #include // Include Mac #elif __APPLE__ #define GL3_PROTOTYPES 1 #include #include // Include UNIX/Linux #else #define GL3_PROTOTYPES 1 #include #endif // Autres includes #include #include #include // Classe Textures class Texture { public: Texture(); Texture(std::string fichierImage); Texture(int largeur, int hauteur, GLenum format = GL_RGBA, GLenum formatInterne = GL_RGBA, bool textureVide = true); Texture(Texture const &autre); ~Texture(); Texture& operator=(Texture const &autre); bool createTexture(); void create( void* sampler = 0 ); SDL_Surface* inverserPixels(SDL_Surface *imageSource) const; GLuint getID() const; void setFichierImage(const std::string &fichierImage); private: GLuint m_id; std::string m_fichierImage; int m_largeur; int m_hauteur; GLenum m_format; GLenum m_formatInterne; bool m_textureVide; }; #endif