Mosaic.h 844 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 <GLES3/gl3.h>
  9. #endif
  10. // Includes GLM
  11. #include <glm/glm.hpp>
  12. #define GLM_ENABLE_EXPERIMENTAL
  13. #include <glm/gtx/transform.hpp>
  14. #include <glm/gtc/type_ptr.hpp>
  15. // Includes
  16. #include <SDL2/SDL.h>
  17. #include <iostream>
  18. #include "ColorCube.h"
  19. #include "Shader.h"
  20. #define DIM 32
  21. class Mosaic
  22. {
  23. public:
  24. Mosaic(std::string const vertexShader, std::string const fragmentShader, std::string const fichierImg, Uint8 redMask, Uint8 greenMask, Uint8 blueMask);
  25. ~Mosaic();
  26. void afficher(glm::mat4 &projection, glm::mat4 modelview);
  27. private:
  28. Shader m_shader;
  29. ColorCube m_mosaic[DIM][DIM];//y;x
  30. bool m_opaque[DIM][DIM];
  31. };
  32. #endif // MOSAIC_H_INCLUDED