Urho3D::GPUObject Class Reference

Base class for GPU resources. More...

#include <Urho3D/Graphics/GPUObject.h>

Inheritance diagram for Urho3D::GPUObject:
[legend]
Collaboration diagram for Urho3D::GPUObject:
[legend]

Public Member Functions

 GPUObject (Graphics *graphics)
 Construct with graphics subsystem pointer.
 
virtual ~GPUObject ()
 Destruct. Remove from the Graphics.
 
virtual void OnDeviceLost ()
 Mark the GPU resource destroyed on graphics context destruction.
 
virtual void OnDeviceReset ()
 Recreate the GPU resource and restore data if applicable.
 
virtual void Release ()
 Unconditionally release the GPU resource.
 
void ClearDataLost ()
 Clear the data lost flag.
 
GraphicsGetGraphics () const
 Return the graphics subsystem associated with this GPU object.
 
void * GetGPUObject () const
 Return the object pointer. Applicable only on Direct3D.
 
unsigned GetGPUObjectName () const
 Return the object name. Applicable only on OpenGL.
 
bool IsDataLost () const
 Return whether data is lost due to context loss.
 
bool HasPendingData () const
 Return whether has pending data assigned while graphics context was lost.
 

Protected Attributes

WeakPtr< Graphicsgraphics_
 Graphics subsystem.
 
GPUObjectHandle object_
 Object pointer or name.
 
bool dataLost_
 Data lost flag.
 
bool dataPending_
 Data pending flag.
 

Detailed Description

Base class for GPU resources.


The documentation for this class was generated from the following files:
  • Source/Urho3D/Graphics/GPUObject.h
  • Source/Urho3D/Graphics/GPUObject.cpp