SceneOpenGL.h 900 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef SCENEOPENGL_H_INCLUDED
  2. #define SCENEOPENGL_H_INCLUDED
  3. // Includes GLM
  4. #include <glm/glm.hpp>
  5. #include <glm/gtx/transform.hpp>
  6. #include <glm/gtc/type_ptr.hpp>
  7. // Includes OpenGL
  8. #include <SDL2/SDL.h>
  9. #define GL3_PROTOTYPES 1
  10. #include <GLES3/gl3.h>
  11. //Includes de base
  12. #include <string>
  13. #include <iostream>
  14. //Autres includes
  15. #include "Shader.h"
  16. #include "Input.h"
  17. // Macro utile au VBO
  18. #ifndef BUFFER_OFFSET
  19. #define BUFFER_OFFSET(offset) ((char*)NULL + (offset))
  20. #endif
  21. class SceneOpenGL
  22. {
  23. public:
  24. SceneOpenGL(std::string titre, int largeur, int hauteur);
  25. ~SceneOpenGL();
  26. bool initialiserFenetre();
  27. bool initGL();
  28. void bouclePrincipale();
  29. private:
  30. std::string m_titreFenetre;
  31. int m_largeurFenetre;
  32. int m_hauteurFenetre;
  33. SDL_Window* m_fenetre;
  34. SDL_GLContext m_contexteOpenGL;
  35. Input m_input;
  36. };
  37. #endif // SCENEOPENGL_H_INCLUDED