#include <glfx.h>
Inheritance diagram for GLFX::IFramebuffer:

fb = fxMgr->CreateFramebuffer(512, 512, 24, 0);
fb->BeginCapture();
fb->AttachTexture(0, GL_TEXTURE_2D, texture, 0, 0);
fb->IsValid();
... render to texture ...
fb->EndCapture();
glBindTexture(GL_TEXTURE_2D, texture);
... render using rendered texture...
Public Member Functions | |
| virtual bool | BeginCapture ()=0 |
| virtual void | EndCapture ()=0 |
| virtual bool | AttachTexture (long attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)=0 |
| virtual bool | IsValid ()=0 |
| virtual void | SetDrawBuffer (long attachment)=0 |
| virtual bool GLFX::IFramebuffer::BeginCapture | ( | ) | [pure virtual] |
Begins rendering to this framebuffer.
| virtual void GLFX::IFramebuffer::EndCapture | ( | ) | [pure virtual] |
Ends rendering to the framebuffer.
| virtual bool GLFX::IFramebuffer::AttachTexture | ( | long | attachment, | |
| GLenum | textarget, | |||
| GLuint | texture, | |||
| GLint | level, | |||
| GLint | zoffset | |||
| ) | [pure virtual] |
Attaches OpenGL texture to the framebuffer.
| attachment | attachment point number | |
| textarget | texture target, one of GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z | |
| texture | OpenGL texture id | |
| level | mipmap level | |
| zoffset | z-offset if 3d texture |
| virtual bool GLFX::IFramebuffer::IsValid | ( | ) | [pure virtual] |
Tests if framebuffer is complete and can be rendered to.
| virtual void GLFX::IFramebuffer::SetDrawBuffer | ( | long | attachment | ) | [pure virtual] |
Sets a attached texture as current draw buffer.
| attachment | attachment number |