Allolib
1.0
C++ Components For Interactive Multimedia
|
Public Member Functions | |
GPUObject (GPUObject const &)=delete | |
GPUObject (GPUObject &&)=delete | |
GPUObject & | operator= (GPUObject const &)=delete |
GPUObject & | operator= (GPUObject &&)=delete |
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. | |
Protected Member Functions | |
virtual void | onCreate ()=0 |
Called when currently assigned context is created. | |
virtual void | onDestroy ()=0 |
Called when currently assigned context is destroyed. | |
Protected Attributes | |
unsigned int | mID |
bool | mResubmit |
Base class for allocated resources on the GPU
Definition at line 75 of file al_GPUObject.hpp.
void al::GPUObject::validate | ( | ) |
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.