SceneOpenGL.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #ifndef DEF_SCENEOPENGL
  2. #define DEF_SCENEOPENGL
  3. // Include Windows
  4. #ifdef WIN32
  5. #include <GL/glew.h>
  6. // Include Mac
  7. #elif __APPLE__
  8. #define GL3_PROTOTYPES 1
  9. #include <OpenGL/gl3.h>
  10. #include <CoreFoundation/CoreFoundation.h>
  11. // Include UNIX/Linux
  12. #else
  13. #define GL3_PROTOTYPES 1
  14. #include <GLES3/gl3.h>
  15. #endif
  16. // Includes GLM
  17. #include <glm/glm.hpp>
  18. #define GLM_ENABLE_EXPERIMENTAL
  19. #include <glm/gtx/transform.hpp>
  20. #include <glm/gtc/type_ptr.hpp>
  21. #include <glm/gtx/rotate_vector.hpp>
  22. // Autres includes
  23. #include <SDL2/SDL.h>
  24. #include <iostream>
  25. #include <string>
  26. #include "Shader.h"
  27. #include "InputAndJoy.h"
  28. #include "TexturLoader.h"
  29. #include "Camera.h"
  30. #include "FrameBuffer.h"
  31. #include "3D/OBJ.h"
  32. #include "3D/Mosaic.h"
  33. // Classe
  34. class SceneOpenGL
  35. {
  36. public:
  37. SceneOpenGL(std::string titreFenetre, int largeurFenetre, int hauteurFenetre);
  38. ~SceneOpenGL();
  39. bool initialiserFenetre();
  40. bool initGL();
  41. void bouclePrincipale();
  42. private:
  43. std::string m_titreFenetre;
  44. int m_largeurFenetre;
  45. int m_hauteurFenetre;
  46. SDL_Window* m_fenetre;
  47. SDL_GLContext m_contexteOpenGL;
  48. InputAndJoy m_input;
  49. TexturLoader m_texturLoader;
  50. Shader m_shader;
  51. Shader m_shLight;
  52. Shader m_shGris;
  53. };
  54. #endif