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

Template class implementing base functionality for a buffer view object. More...

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

Public Member Functions

 BufferViewBase (IReferenceCounters *pRefCounters, IRenderDevice *pDevice, const BufferViewDesc &ViewDesc, IBuffer *pBuffer, bool bIsDefaultView)
 
virtual IBufferGetBuffer () override final
 Implementation of IBufferView::GetBuffer()
 
- Public Member Functions inherited from Diligent::DeviceObjectBase< BaseInterface, BufferViewDesc >
 DeviceObjectBase (IReferenceCounters *pRefCounters, IRenderDevice *pDevice, const BufferViewDesc &ObjDesc, bool bIsDeviceInternal=false)
 
UniqueIdentifier GetUniqueID () const
 Returns unique identifier. More...
 

Protected Attributes

IBuffer *const m_pBuffer
 Pointer to the buffer.
 
RefCntAutoPtr< IBufferm_spBuffer
 Strong reference to the buffer. Used for non-default views to keep the buffer alive.
 
- Protected Attributes inherited from Diligent::DeviceObjectBase< BaseInterface, BufferViewDesc >
const String m_ObjectNameCopy
 Copy of a device object name. More...
 
BufferViewDesc m_Desc
 Object description.
 

Detailed Description

template<class BaseInterface>
class Diligent::BufferViewBase< BaseInterface >

Template class implementing base functionality for a buffer view object.

Template Parameters
BaseInterface- base interface that this class will inheret (Diligent::IBufferViewD3D11, Diligent::IBufferViewD3D12 or Diligent::IBufferViewGL).
BuffViewObjAllocator- type of the allocator that is used to allocate memory for the buffer view object instances

Constructor & Destructor Documentation

◆ BufferViewBase()

template<class BaseInterface>
Diligent::BufferViewBase< BaseInterface >::BufferViewBase ( IReferenceCounters *  pRefCounters,
IRenderDevice pDevice,
const BufferViewDesc ViewDesc,
IBuffer pBuffer,
bool  bIsDefaultView 
)
inline
Parameters
pRefCounters- reference counters object that controls the lifetime of this buffer view.
pDevice- pointer to the render device.
ViewDesc- buffer view description.
pBuffer- pointer to the buffer that the view is to be created for.
bIsDefaultView- flag indicating if the view is default view, and is thus part of the buffer object. In this case the view will attach to the buffer's reference counters.