Sol.h 777 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef DEF_SOL
  2. #define DEF_SOL
  3. // Includes OpenGL
  4. #ifdef WIN32
  5. #include <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. // Autres includes
  16. #include "Shader.h"
  17. #include "Texture.h"
  18. // Classe Sol
  19. class Sol
  20. {
  21. public:
  22. Sol(float longueur, float largeur, int repetitionLongueur, int repetitionLargeur, std::string const vertexShader, std::string const fragmentShader, std::string const texture);
  23. ~Sol();
  24. void afficher(glm::mat4 &projection, glm::mat4 &modelview);
  25. private:
  26. Shader m_shader;
  27. Texture m_texture;
  28. float m_vertices[18];
  29. float m_coordTexture[12];
  30. };
  31. #endif