Diligent Engine API Reference: Diligent::IBufferD3D12 Class Reference

Diligent Engine API Reference

Public Member Functions | List of all members
Diligent::IBufferD3D12 Class Referenceabstract

Interface to the buffer object implemented in D3D12. More...

Inheritance diagram for Diligent::IBufferD3D12:

## Public Member Functions
virtual ID3D12Resource * | GetD3D12Buffer (size_t &DataStartByteOffset, Uint32 ContextId)=0
| Returns a pointer to the ID3D12Resource interface of the internal Direct3D12 object. More...
virtual void | SetD3D12ResourceState (D3D12_RESOURCE_STATES state)=0
| Sets the buffer usage state. More...
Public Member Functions inherited from Diligent::IBuffer
virtual void | QueryInterface (const Diligent::INTERFACE_ID &IID, IObject **ppInterface)=0
| Queries the specific interface, see IObject::QueryInterface() for details.
virtual const BufferDesc & | GetDesc () const =0
| Returns the buffer description used to create the object.
virtual void | UpdateData (class IDeviceContext *pContext, Uint32 Offset, Uint32 Size, const PVoid pData)=0
| Updates the data in the buffer. More...
virtual void | CopyData (IDeviceContext *pContext, IBuffer *pSrcBuffer, Uint32 SrcOffset, Uint32 DstOffset, Uint32 Size)=0
| Copies the data from other buffer. More...
virtual void | Map (IDeviceContext *pContext, MAP_TYPE MapType, Uint32 MapFlags, PVoid &pMappedData)=0
| Maps the buffer. More...
virtual void | Unmap (IDeviceContext *pContext, MAP_TYPE MapType, Uint32 MapFlags)=0
| Unmaps the previously mapped buffer. More...
virtual void | CreateView (const struct BufferViewDesc &ViewDesc, class IBufferView **ppView)=0
| Creates a new buffer view. More...
virtual IBufferView * | GetDefaultView (BUFFER_VIEW_TYPE ViewType)=0
| Returns the pointer to the default view. More...
virtual void * | GetNativeHandle ()=0
| Returns native buffer handle specific to the underlying graphics API. More...
Public Member Functions inherited from Diligent::IDeviceObject
virtual void | QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0
| Queries the specific interface, see IObject::QueryInterface() for details.

## Detailed Description

Interface to the buffer object implemented in D3D12.

## Member Function Documentation

## ◆ GetD3D12Buffer()

virtual ID3D12Resource* Diligent::IBufferD3D12::GetD3D12Buffer | ( | size_t & | DataStartByteOffset,
|  | Uint32 | ContextId
| ) |  |
| pure virtual

Returns a pointer to the ID3D12Resource interface of the internal Direct3D12 object.

The method does NOT call AddRef() on the returned interface, so Release() must not be called.

Parameters

  [in] | DataStartByteOffset | - Offset from the beginning of the buffer to the start of the data. This parameter is required for dynamic buffers, which are suballocated in a dynamic upload heap
  [in] | ContextId | - Id of the context within which address of the buffer is requested.

Implemented in Diligent::BufferD3D12Impl.

## ◆ SetD3D12ResourceState()

virtual void Diligent::IBufferD3D12::SetD3D12ResourceState | ( | D3D12_RESOURCE_STATES | state | ) |
| pure virtual

Sets the buffer usage state.

Parameters

  [in] | state | - D3D12 resource state to be set for this buffer

Implemented in Diligent::BufferD3D12Impl.