Cube.h 611 B

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