12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- #ifndef DEF_SCENEOPENGL
- #define DEF_SCENEOPENGL
- // Include Windows
- #ifdef WIN32
- #include <GL/glew.h>
- // Include Mac
- #elif __APPLE__
- #define GL3_PROTOTYPES 1
- #include <OpenGL/gl3.h>
- #include <CoreFoundation/CoreFoundation.h>
- // Include UNIX/Linux
- #else
- #define GL3_PROTOTYPES 1
- #include <GLES3/gl3.h>
- #endif
- // Includes GLM
- #include <glm/glm.hpp>
- #define GLM_ENABLE_EXPERIMENTAL
- #include <glm/gtx/transform.hpp>
- #include <glm/gtc/type_ptr.hpp>
- #include <glm/gtx/rotate_vector.hpp>
- // Autres includes
- #include <SDL2/SDL.h>
- #include <iostream>
- #include <string>
- #include "Shader.h"
- #include "InputAndJoy.h"
- #include "TexturLoader.h"
- #include "Camera.h"
- #include "FrameBuffer.h"
- #include "3D/OBJ.h"
- #include "3D/Mosaic.h"
- // Classe
- class SceneOpenGL
- {
- public:
- SceneOpenGL(std::string titreFenetre, int largeurFenetre, int hauteurFenetre);
- ~SceneOpenGL();
- bool initialiserFenetre();
- bool initGL();
- void bouclePrincipale();
- private:
- std::string m_titreFenetre;
- int m_largeurFenetre;
- int m_hauteurFenetre;
- SDL_Window* m_fenetre;
- SDL_GLContext m_contexteOpenGL;
- InputAndJoy m_input;
- TexturLoader m_texturLoader;
- Shader m_shader;
- Shader m_shLight;
- Shader m_shGris;
- };
- #endif
|