1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #ifndef MOSAIC_H_INCLUDED
- #define MOSAIC_H_INCLUDED
- // Includes OpenGL
- #ifdef WIN32
- #include <GL/glew.h>
- #else
- #define GL3_PROTOTYPES 1
- #include <GLES3/gl3.h>
- #endif
- // Includes GLM
- #include <glm/glm.hpp>
- #define GLM_ENABLE_EXPERIMENTAL
- #include <glm/gtx/transform.hpp>
- #include <glm/gtc/type_ptr.hpp>
- // Includes
- #include <SDL2/SDL.h>
- #include <iostream>
- #include "ColorCube.h"
- #include "Shader.h"
- #define DIM 32
- class Mosaic
- {
- public:
- Mosaic(std::string const vertexShader, std::string const fragmentShader, std::string const fichierImg, Uint8 redMask, Uint8 greenMask, Uint8 blueMask);
- ~Mosaic();
- void afficher(glm::mat4 &projection, glm::mat4 modelview);
- private:
- Shader m_shader;
- ColorCube m_mosaic[DIM][DIM];//y;x
- bool m_opaque[DIM][DIM];
- };
- #endif // MOSAIC_H_INCLUDED
|