123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef DEF_COLORCUBE
- #define DEF_COLORCUBE
- // Includes OpenGL
- #ifdef WIN32
- #include <GL/glew.h>
- #else
- #define GL3_PROTOTYPES 1
- #include <GL/gl.h>
- #endif
- // Includes GLM
- #include <glm/glm.hpp>
- #define GLM_ENABLE_EXPERIMENTAL
- #include <glm/gtx/transform.hpp>
- #include <glm/gtc/type_ptr.hpp>
- // Classe ColorCube
- class ColorCube
- {
- public:
- ColorCube();
- ColorCube(float taille, float red, float green, float blue);
- ~ColorCube();
- void setColor(float red, float green, float blue);
- void afficher();// Vérouiller un shader et lui envoyer projection et modelview avant
- void move(glm::vec3 deplacement);
- private:
- float m_vertices[42];
- float m_couleurs[42];
- };
- unsigned int getNbColorCubes();
- #endif
|