Surface3D.h 822 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef SURFACE3D_H_INCLUDED
  2. #define SURFACE3D_H_INCLUDED
  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 <iostream>
  16. #include "Shader.h"
  17. #include "Texture.h"
  18. class Surface3D
  19. {
  20. public:
  21. Surface3D(float tailleX, float tailleY, std::string const vertexShader, std::string const fragmentShader,
  22. std::string const fichierImage, float multi=0);
  23. ~Surface3D();
  24. void afficher(glm::mat4 &projection, glm::mat4 &modelview);
  25. private:
  26. Shader m_shader;
  27. Texture m_texture;
  28. float m_vertices[18];
  29. float m_coordTexture[12];
  30. };
  31. #endif // SURFACE3D_H_INCLUDED