Cube.h 640 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef DEF_CUBE
  2. #define DEF_CUBE
  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. // Includes
  16. #include "Shader.h"
  17. // Classe Cube
  18. class Cube
  19. {
  20. public:
  21. Cube(float taille, std::string const vertexShader, std::string const fragmentShader);
  22. ~Cube();
  23. void afficher(glm::mat4 &projection, glm::mat4 &modelview);
  24. protected:
  25. Shader m_shader;
  26. float m_vertices[108];
  27. float m_couleurs[108];
  28. };
  29. #endif