ColorCube.h 714 B

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