12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #ifndef DEF_FRAMEBUFFER
- #define DEF_FRAMEBUFFER
- // Include Windows
- #ifdef WIN32
- #include <GL/glew.h>
- // Include Mac
- #elif __APPLE__
- #define GL3_PROTOTYPES 1
- #include <OpenGL/gl3.h>
- // Include UNIX/Linux
- #else
- #define GL3_PROTOTYPES 1
- #include <GLES3/gl3.h>
- #endif
- // Includes communs
- #include <vector>
- #include "Texture.h"
- // Classe
- class FrameBuffer
- {
- public:
- FrameBuffer();
- FrameBuffer(int largeur, int hauteur, bool stencil = false);
- FrameBuffer(const FrameBuffer &frameBufferACopier);
- ~FrameBuffer();
- bool charger();
- void creerRenderBuffer(GLuint &id, GLenum formatInterne);
- GLuint getID() const;
- Texture* getColorBuffer(unsigned int index);
- int getLargeur() const;
- int getHauteur() const;
- private:
- GLuint m_id;
- int m_largeur;
- int m_hauteur;
- std::vector<Texture*> m_colorBuffers;
- GLuint m_depthBufferID;
- bool m_stencil;
- };
- #endif
|