Diligent::IBuffer struct

Buffer interface.

Defines the methods to manipulate a buffer object

Base classes

struct IDeviceObject
Base interface for all objects created by the render device Diligent::IRenderDevice.

Derived classes

struct IBufferD3D11
Exposes Direct3D11-specific functionality of a buffer object.
struct IBufferD3D12
Exposes Direct3D12-specific functionality of a buffer object.
struct IBufferGL
Exposes OpenGL-specific functionality of a buffer object.
class IBufferMtl
Exposes Metal-specific functionality of a buffer object.
struct IBufferVk
Exposes Vulkan-specific functionality of a buffer object.

Public functions

auto GetDesc() const -> const BufferDesc&METHOD() override
Returns the buffer description used to create the object.
auto CreateView(const BufferViewDesc& ViewDesc, IBufferView** ppView) -> void METHOD() virtual
Creates a new buffer view.
auto GetDefaultView(BUFFER_VIEW_TYPE ViewType) -> IBufferView*METHOD() virtual
Returns the pointer to the default view.
auto GetNativeHandle() -> void*METHOD() virtual
Returns native buffer handle specific to the underlying graphics API.
auto SetState(RESOURCE_STATE State) -> void METHOD() virtual
Sets the buffer usage state.
auto GetState() const -> RESOURCE_STATE METHOD() virtual
Returns the internal buffer state.

Function documentation

void METHOD() Diligent::IBuffer::CreateView(const BufferViewDesc& ViewDesc, IBufferView** ppView) virtual

Creates a new buffer view.

Parameters
ViewDesc in - View description. See Diligent::BufferViewDesc for details.
ppView out - Address of the memory location where the pointer to the view interface will be written to.

IBufferView*METHOD() Diligent::IBuffer::GetDefaultView(BUFFER_VIEW_TYPE ViewType) virtual

Returns the pointer to the default view.

Parameters
ViewType in - Type of the requested view. See Diligent::BUFFER_VIEW_TYPE.
Returns Pointer to the interface

void*METHOD() Diligent::IBuffer::GetNativeHandle() virtual

Returns native buffer handle specific to the underlying graphics API.

Returns pointer to ID3D11Resource interface, for D3D11 implementation
pointer to ID3D12Resource interface, for D3D12 implementation
GL buffer handle, for GL implementation

void METHOD() Diligent::IBuffer::SetState(RESOURCE_STATE State) virtual

Sets the buffer usage state.