Base interface for all objects created by the render device Diligent::IRenderDevice. More...
#include <DeviceObject.h>
Public Member Functions | |
virtual const DeviceObjectAttribs &DILIGENT_CALL_TYPE | GetDesc () const =0 |
Returns the object description. | |
virtual Int32 DILIGENT_CALL_TYPE | GetUniqueID () const =0 |
Returns unique identifier assigned to an object. | |
virtual void DILIGENT_CALL_TYPE | SetUserData (IObject *pUserData)=0 |
Stores a pointer to the user-provided data object. | |
virtual IObject *DILIGENT_CALL_TYPE | GetUserData () const =0 |
Returns a pointer to the user data object previously set with SetUserData() method. | |
![]() | |
virtual void DILIGENT_CALL_TYPE | QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0 |
Queries the specific interface. | |
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | AddRef ()=0 |
Increments the number of strong references by 1. | |
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | Release ()=0 |
virtual IReferenceCounters *DILIGENT_CALL_TYPE | GetReferenceCounters () const =0 |
Base interface for all objects created by the render device Diligent::IRenderDevice.
|
pure virtual |
Returns unique identifier assigned to an object.
Unique identifiers can be used to reliably check if two objects are identical. Note that the engine reuses memory reclaimed after an object has been released. For example, if a texture object is released and then another texture is created, the engine may return the same pointer, so pointer-to-pointer comparisons are not reliable. Unique identifiers, on the other hand, are guaranteed to be, well, unique.
Unique identifiers are object-specifics, so, for instance, buffer identifiers are not comparable to texture identifiers.
Unique identifiers are only meaningful within one session. After an application restarts, all identifiers become invalid.
Valid identifiers are always positive values. Zero and negative values can never be assigned to an object and are always guaranteed to be invalid.
Implemented in Diligent::DeviceObjectBase< IDeviceObject, RenderDeviceVkImpl, DeviceObjectAttribs >, and Diligent::DeviceObjectBase< IDeviceObject, RenderDeviceVkImpl, DeviceObjectAttribs >.
|
pure virtual |
Returns a pointer to the user data object previously set with SetUserData() method.
Implemented in Diligent::DeviceObjectBase< IDeviceObject, RenderDeviceVkImpl, DeviceObjectAttribs >, and Diligent::DeviceObjectBase< IDeviceObject, RenderDeviceVkImpl, DeviceObjectAttribs >.
|
pure virtual |
Stores a pointer to the user-provided data object.
The data may later be retrieved through GetUserData().
[in] | pUserData | - Pointer to the user data object to store. |
The method keeps strong reference to the user data object. If an application needs to release the object, it should call SetUserData(nullptr);
Implemented in Diligent::DeviceObjectBase< IDeviceObject, RenderDeviceVkImpl, DeviceObjectAttribs >, and Diligent::DeviceObjectBase< IDeviceObject, RenderDeviceVkImpl, DeviceObjectAttribs >.