SceneOpenGL.h 1006 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef DEF_SCENEOPENGL
  2. #define DEF_SCENEOPENGL
  3. // Includes
  4. #ifdef WIN32
  5. #include <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. // Autres includes
  16. #include <SDL2/SDL.h>
  17. #include <iostream>
  18. #include <string>
  19. #include "Shader.h"
  20. #include "Cube.h"
  21. #include "Input.h"
  22. #include "Texture.h"
  23. #include "Caisse.h"
  24. #include "Camera.h"
  25. #include "Cabane.h"
  26. #include "Sol.h"
  27. #include "Cristal.h"
  28. // Classe
  29. class SceneOpenGL
  30. {
  31. public:
  32. SceneOpenGL(std::string titreFenetre, int largeurFenetre, int hauteurFenetre);
  33. ~SceneOpenGL();
  34. bool initialiserFenetre();
  35. bool initGL();
  36. void bouclePrincipale();
  37. private:
  38. std::string m_titreFenetre;
  39. int m_largeurFenetre;
  40. int m_hauteurFenetre;
  41. SDL_Window* m_fenetre;
  42. SDL_GLContext m_contexteOpenGL;
  43. SDL_Event m_evenements;
  44. Input m_input;
  45. };
  46. #endif