Texture.h 672 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef TEXTURE_H_INCLUDED
  2. #define TEXTURE_H_INCLUDED
  3. // Includes OpenGL + SDL
  4. #ifdef WIN32
  5. #include <GL/glew.h>
  6. #else
  7. #define GL3_PROTOTYPES 1
  8. #include <GLES3/gl3.h>
  9. #endif
  10. #include <SDL2/SDL.h>
  11. // Basiques
  12. #include <iostream>
  13. // Classe Texture
  14. class Texture
  15. {
  16. public:
  17. Texture();
  18. Texture(Texture const &textureACopier);
  19. ~Texture();
  20. Texture& operator=(Texture const &textureACopier);
  21. bool charger(std::string fichierImage);
  22. GLuint getID() const;
  23. SDL_Surface* inverserPixels(SDL_Surface *imageSource) const;
  24. private:
  25. GLuint m_id;
  26. std::string m_chemin;
  27. };
  28. #endif // TEXTURE_H_INCLUDED