Mosaic.h 808 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef MOSAIC_H_INCLUDED
  2. #define MOSAIC_H_INCLUDED
  3. // Includes OpenGL
  4. #ifdef WIN32
  5. #include <GL/glew.h>
  6. #else
  7. #define GL3_PROTOTYPES 1
  8. #include <GL/gl.h>
  9. #endif
  10. // Includes GLM
  11. #include <glm/glm.hpp>
  12. #include <glm/gtx/transform.hpp>
  13. #include <glm/gtc/type_ptr.hpp>
  14. // Includes
  15. #include <SDL2/SDL.h>
  16. #include <iostream>
  17. #include "ColorCube.h"
  18. #include "Shader.h"
  19. #define DIM 32
  20. class Mosaic
  21. {
  22. public:
  23. Mosaic(std::string const vertexShader, std::string const fragmentShader, std::string const fichierImg, Uint8 redMask, Uint8 greenMask, Uint8 blueMask);
  24. ~Mosaic();
  25. void afficher(glm::mat4 &projection, glm::mat4 modelview);
  26. private:
  27. Shader m_shader;
  28. ColorCube m_mosaic[DIM][DIM];//y;x
  29. bool m_opaque[DIM][DIM];
  30. };
  31. #endif // MOSAIC_H_INCLUDED