ColorCube.h 746 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef DEF_COLORCUBE
  2. #define DEF_COLORCUBE
  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. // Classe ColorCube
  16. class ColorCube
  17. {
  18. public:
  19. ColorCube();
  20. ColorCube(float taille, float red, float green, float blue);
  21. ~ColorCube();
  22. void setColor(float red, float green, float blue);
  23. void afficher();// Vérouiller un shader et lui envoyer projection et modelview avant
  24. void move(glm::vec3 deplacement);
  25. private:
  26. float m_vertices[42];
  27. float m_couleurs[42];
  28. };
  29. unsigned int getNbColorCubes();
  30. #endif