Allolib  1.0
C++ Components For Interactive Multimedia
al::RBO Class Reference

Render buffer object class. More...

#include <C:/Users/Andres/source/repos/casm_viewer/external/tinc/external/allolib/include/al/graphics/al_FBO.hpp>

Inheritance diagram for al::RBO:
al::GPUObject

Public Member Functions

 RBO (unsigned int format=GL_DEPTH_COMPONENT16)
 
unsigned int format () const
 Get internal pixel format.
 
RBOformat (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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ RBO()

al::RBO::RBO ( unsigned int  format = GL_DEPTH_COMPONENT16)
Parameters
[in]formatinternal format of buffer

Member Function Documentation

◆ resize()

bool al::RBO::resize ( unsigned  width,
unsigned  height 
)

Set dimensions, in pixels.

Parameters
[in]widthwidth, in pixels
[in]heightheight, in pixels
Returns
whether the resize was successful

◆ validate()

void al::GPUObject::validate ( )
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.


The documentation for this class was generated from the following file: