jubilant-funicular
|
A wrapper around an OpenGL Framebuffer object. More...
#include <FrameBuffer.h>
Public Member Functions | |
void | init () |
Initializes a new FrameBuffer (deleting the old one if it existed) | |
void | use () const |
Binds this FrameBuffer. | |
void | set_texture (GLuint idx=0) const |
Sets which texture to draw to. | |
void | unuse () const |
Binds the default FrameBuffer (i.e. the screen) | |
GLuint | add_texture (GLuint width, GLuint height, GLint min_filt=GL_LINEAR, GLint mag_filt=GL_LINEAR, bool rgba=true) |
Returns index of added texture. | |
GLuint | get_tex (GLuint idx=0) const |
Returns id of texture associated with GL_COLOR_ATTACHMENTidx. | |
GLuint | get_width (GLuint idx=0) const |
Returns width of texture associated with GL_COLOR_ATTACHMENTidx. | |
GLuint | get_height (GLuint idx=0) const |
Returns height of texture associated with GL_COLOR_ATTACHMENTidx. | |
GLuint | num_texs () const |
void | destroy () |
Destroys this FrameBuffer. | |
Private Attributes | |
GLuint | m_fbo |
The id of this frame buffer. | |
std::vector< GLuint > | m_texs |
The textures to draw to. | |
std::vector< GLuint > | m_rbos |
The render buffer objects (currently unused) | |
A wrapper around an OpenGL Framebuffer object.
Definition at line 10 of file FrameBuffer.h.