1 #ifndef INCLUDE_AL_GRAPHICS_GPUOBJECT_H
2 #define INCLUDE_AL_GRAPHICS_GPUOBJECT_H
99 unsigned long id()
const {
return mID; }
101 void id(
unsigned long v) { mID = v; }
void validate()
Ensure that the GPUObject is ready to use.
unsigned long id() const
Returns the assigned object id.
virtual void onDestroy()=0
Called when currently assigned context is destroyed.
void destroy()
Destroys object on GPU.
bool created() const
Returns whether object has been created.
void create()
Creates object on GPU.
virtual void onCreate()=0
Called when currently assigned context is created.
void invalidate()
Triggers re-creation of object safely.