Diligent Engine API Reference
Public Member Functions | Protected Attributes | List of all members
Diligent::DeviceObjectBase< BaseInterface, ObjectDescType > Class Template Reference

Template class implementing base functionality for a device object. More...

Inheritance diagram for Diligent::DeviceObjectBase< BaseInterface, ObjectDescType >:
Diligent::ObjectBase< BaseInterface > Diligent::RefCountedObject< BaseInterface >

Public Member Functions

 DeviceObjectBase (IReferenceCounters *pRefCounters, IRenderDevice *pDevice, const ObjectDescType &ObjDesc, bool bIsDeviceInternal=false)
 
UniqueIdentifier GetUniqueID () const
 Returns unique identifier. More...
 

Protected Attributes

const String m_ObjectNameCopy
 Copy of a device object name. More...
 
ObjectDescType m_Desc
 Object description.
 

Detailed Description

template<class BaseInterface, typename ObjectDescType>
class Diligent::DeviceObjectBase< BaseInterface, ObjectDescType >

Template class implementing base functionality for a device object.

Constructor & Destructor Documentation

◆ DeviceObjectBase()

template<class BaseInterface, typename ObjectDescType>
Diligent::DeviceObjectBase< BaseInterface, ObjectDescType >::DeviceObjectBase ( IReferenceCounters *  pRefCounters,
IRenderDevice pDevice,
const ObjectDescType &  ObjDesc,
bool  bIsDeviceInternal = false 
)
inline
Parameters
pRefCounters- reference counters object that controls the lifetime of this device object
pDevice- pointer to the render device.
ObjDesc- object description.
bIsDeviceInternal- flag indicating if the object is an internal device object and must not keep a strong reference to the device.

Member Function Documentation

◆ GetUniqueID()

template<class BaseInterface, typename ObjectDescType>
UniqueIdentifier Diligent::DeviceObjectBase< BaseInterface, ObjectDescType >::GetUniqueID ( ) const
inline

Returns unique identifier.

Note
This unique ID is used to unambiguously identify device object for tracking purposes. Niether GL handle nor pointer could be safely used for this purpose as both GL reuses released handles and the OS reuses released pointers

Member Data Documentation

◆ m_ObjectNameCopy

template<class BaseInterface, typename ObjectDescType>
const String Diligent::DeviceObjectBase< BaseInterface, ObjectDescType >::m_ObjectNameCopy
protected

Copy of a device object name.

When new object is created, its description structure is copied to m_Desc, the name is copied to m_ObjectNameCopy, and m_Desc.Name pointer is set to m_ObjectNameCopy.c_str().