representation d'un (draw) framebuffer. More...
#include <TPFramebuffer.h>
Public Member Functions | |
| GLFramebuffer () | |
| constructeur. | |
| GLFramebuffer (const int w, const int h, const unsigned int buffer_bits) | |
| constructeur, cf GLRendertarget(). | |
| ~GLFramebuffer () | |
| destructeur. | |
| int | attachTexture (const unsigned int buffer, GLTexture2D *texture, const int level=0) |
| associe une texture au framebuffer. cf GLRendertarget::attachTexture(). | |
| int | attachTexture (const GLenum target, const unsigned int buffer, GLDepthTexture *texture, const int level=0) |
| associe une texture au framebuffer. cf GLRendertarget::attachTexture(). | |
| int | attachTexture (const GLenum target, const unsigned int buffer, GLTexture2DArray *texture, const int layer, const int level=0) |
| associe une texture au framebuffer. cf GLRendertarget::attachTexture(). | |
| int | attachTexture (const GLenum target, const unsigned int buffer, GLTextureCube *texture, const GLenum face, const int level=0) |
| associe une texture au framebuffer. cf GLRendertarget::attachTexture(). | |
| int | validate () |
| valide la configuration du framebuffer. | |
| int | attachTexture (const GLenum target, const unsigned int buffer, GLTexture2D *texture, const int level=0) |
| associe une texture existante au framebuffer. | |
| int | createGLResource () |
| creation de l'objet opengl. | |
| int | releaseGLResource () |
| destruction de l'objet opengl. | |
| int | validate (const GLenum target) |
| verifie la configuration du framebuffer. | |
| int | width () const |
| renvoie la largeur du framebuffer. renvoie 0, si la largeur du framebuffer n'est pas definie. | |
| int | height () const |
| renvoie la hauteur du framebuffer. renvoie 0, si la hauteur du framebuffer n'est pas definie. | |
| GLTexture * | texture (const unsigned int buffer) |
| renvoie la texture associee a buffer (cf gk::COLOR0, gk::COLOR1, gk::DEPTH, etc.) | |
| GLDepthTexture * | zbuffer () |
| renvoie le zbuffer | |
| const std::vector< GLenum > & | drawBuffers () const |
| renvoie les draw buffers opengl / textures attachees (cf. glDrawBuffers() et GL_COLOR_ATTACHMENT0, etc.). | |
| GLuint | name () const |
| operator GLuint () const | |
Protected Member Functions | |
| template<typename Texture > | |
| int | attach_buffer (const unsigned int buffer, Texture *texture) |
Protected Attributes | |
| std::vector< GLTexture * > | m_textures |
| std::vector< GLenum > | m_draw_buffers |
| int | m_width |
| int | m_height |
| GLuint | m_name |
representation d'un (draw) framebuffer.
| int gk::GLRendertarget::attachTexture | ( | const GLenum | target, | |
| const unsigned int | buffer, | |||
| GLTexture2D * | texture, | |||
| const int | level = 0 | |||
| ) | [inherited] |
associe une texture existante au framebuffer.
buffer = gk::COLOR0, etc. ou gk::DEPTH. toutes les textures doivent avoir les memes dimensions.
References gk::GLTexture::target().
| const std::vector<GLenum>& gk::GLRendertarget::drawBuffers | ( | ) | const [inline, inherited] |
renvoie les draw buffers opengl / textures attachees (cf. glDrawBuffers() et GL_COLOR_ATTACHMENT0, etc.).
const std::vector<GLenum>& buffers= framebuffer->drawBuffers();
glDrawbuffers((GLsizei) buffers.size(), &buffers.front());
1.6.3