Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
Public Member Functions | Private Attributes | List of all members
blowbox::TypedBuffer Class Reference

#include <typed_buffer.h>

Public Member Functions

 TypedBuffer ()
 
 TypedBuffer (DXGI_FORMAT format)
 
virtual void CreateDerivedViews () override
 
- Public Member Functions inherited from blowbox::GpuBuffer
virtual ~GpuBuffer ()
 
virtual void Destroy ()
 
virtual void Create (const WString &name, UINT num_elements, UINT element_size, void *initial_data=nullptr, bool create_views=true)
 
const UINT & GetUAV () const
 
const UINT & GetSRV () const
 
const D3D12_GPU_VIRTUAL_ADDRESS & GetRootCBV () const
 
D3D12_GPU_VIRTUAL_ADDRESS GetRootCBV ()
 
D3D12_VERTEX_BUFFER_VIEW GetVertexBufferView (UINT offset, UINT size, UINT stride) const
 
D3D12_VERTEX_BUFFER_VIEW GetVertexBufferView (UINT base_vertex_index=0) const
 
D3D12_INDEX_BUFFER_VIEW GetIndexBufferView (UINT offset, UINT size, bool is_32_bit=false) const
 
D3D12_INDEX_BUFFER_VIEW GetIndexBufferView (UINT start_index=0) const
 
- Public Member Functions inherited from blowbox::GpuResource
 GpuResource ()
 
 GpuResource (ID3D12Resource *resource, D3D12_RESOURCE_STATES current_state)
 
virtual ~GpuResource ()
 
void Associate (ID3D12Resource *resource, D3D12_RESOURCE_STATES current_state)
 
void Destroy ()
 
ID3D12Resource * operator-> ()
 
const ID3D12Resource * operator-> () const
 
 operator ID3D12Resource * ()
 
ID3D12Resource * Get ()
 
const D3D12_RESOURCE_STATES & GetState () const
 
const D3D12_RESOURCE_STATES & GetTransitionState () const
 

Private Attributes

DXGI_FORMAT data_format_
 

Additional Inherited Members

- Protected Member Functions inherited from blowbox::GpuBuffer
 GpuBuffer ()
 
D3D12_RESOURCE_DESC DescribeBuffer ()
 
- Protected Member Functions inherited from blowbox::GpuResource
void AddToMemoryProfiler ()
 
void RemoveFromMemoryProfiler ()
 
- Protected Attributes inherited from blowbox::GpuBuffer
UINT uav_id_
 
UINT srv_id_
 
UINT element_count_
 
UINT element_size_
 
UINT buffer_size_
 
D3D12_RESOURCE_FLAGS resource_flags_
 
- Protected Attributes inherited from blowbox::GpuResource
WString name_
 
ID3D12Resource * resource_
 
D3D12_RESOURCE_STATES usage_state_
 
D3D12_RESOURCE_STATES transition_state_
 
D3D12_GPU_VIRTUAL_ADDRESS gpu_virtual_address_
 

Detailed Description

Wrapper for formatted buffer types.

This type of buffer acts similarly to a StructuredBuffer, except every element in the buffer is formatted in the form of a DXGI_FORMAT.

Inheritance diagram for blowbox::TypedBuffer:
blowbox::GpuBuffer blowbox::GpuResource

Constructor & Destructor Documentation

blowbox::TypedBuffer::TypedBuffer ( )

Constructs a TypedBuffer.

blowbox::TypedBuffer::TypedBuffer ( DXGI_FORMAT  format)

Constructs a TypedBuffer with a given format.

Parameters
[in]formatThe format of each element in the buffer.

Member Function Documentation

void blowbox::TypedBuffer::CreateDerivedViews ( )
overridevirtual

Creates the descriptor views (descriptors) for this TypedBuffer.

Implements blowbox::GpuBuffer.

Member Data Documentation

DXGI_FORMAT blowbox::TypedBuffer::data_format_
private

The format of each element in the typed buffer.


The documentation for this class was generated from the following files: