12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #ifndef SURFACE3D_H_INCLUDED
- #define SURFACE3D_H_INCLUDED
- // Includes OpenGL
- #ifdef WIN32
- #include <GL/glew.h>
- #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>
- // Includes
- #include <iostream>
- #include "Shader.h"
- #include "Texture.h"
- #include "macro.h"
- class Surface3D
- {
- public:
- Surface3D(float tailleX, float tailleY, std::string const fichierImage, float multi=1); // Détruira la texture
- Surface3D(float tailleX, float tailleY, GLuint samplerID, float multi=1); // Ne détruira pas la texture
- ~Surface3D();
- void afficher(glm::mat4 pmv, Shader const &shad);
- void charger();
- private:
- Texture* m_texture;
- GLuint m_textID;
- float m_vertices[18];
- float m_coordTexture[12];
- GLuint m_vboID;
- int m_tailleVerticesBytes;
- int m_tailleCoordTextureBytes;
- GLuint m_vaoID;
- };
- #endif // SURFACE3D_H_INCLUDED
|