Allolib
1.0
C++ Components For Interactive Multimedia
|
Render buffer object class. More...
Public Member Functions | |
RBO (unsigned int format=GL_DEPTH_COMPONENT16) | |
unsigned int | format () const |
Get internal pixel format. | |
RBO & | format (unsigned int v) |
Set internal pixel format. | |
void | bind () |
Bind object. | |
void | unbind () |
Unbind object. | |
bool | resize (unsigned width, unsigned height) |
Set dimensions, in pixels. More... | |
void | create (unsigned int width, unsigned int height, unsigned int format=GL_DEPTH_COMPONENT16) |
bool | created () const |
Returns whether object has been created. | |
void | create () |
Creates object on GPU. | |
void | destroy () |
Destroys object on GPU. | |
unsigned long | id () const |
Returns the assigned object id. | |
void | id (unsigned long v) |
void | validate () |
Ensure that the GPUObject is ready to use. More... | |
void | invalidate () |
Triggers re-creation of object safely. | |
Static Public Member Functions | |
static unsigned | maxSize () |
Get maximum buffer size. | |
static void | bind (unsigned id) |
static bool | resize (unsigned int format, unsigned width, unsigned height) |
Protected Member Functions | |
virtual void | onCreate () |
Called when currently assigned context is created. | |
virtual void | onDestroy () |
Called when currently assigned context is destroyed. | |
Protected Attributes | |
unsigned int | mFormat |
unsigned int | mID |
bool | mResubmit |
Render buffer object class.
Render buffer objects are used for offscreen rendering. They are a single image of a renderable internal format, such as color, depth, or stencil.
Definition at line 83 of file al_FBO.hpp.
al::RBO::RBO | ( | unsigned int | format = GL_DEPTH_COMPONENT16 | ) |
[in] | format | internal format of buffer |
bool al::RBO::resize | ( | unsigned | width, |
unsigned | height | ||
) |
Set dimensions, in pixels.
[in] | width | width, in pixels |
[in] | height | height, in pixels |
|
inherited |
Ensure that the GPUObject is ready to use.
This is typically placed before any rendering implementation. If the object has been invalidated, the object will be destroyed and then created again. Otherwise, the object will simply be created if not already created.