Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
|
#include <pixel_buffer.h>
Public Member Functions | |
PixelBuffer () | |
const UINT & | GetWidth () const |
const UINT & | GetHeight () const |
const DXGI_FORMAT & | GetFormat () 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 |
Protected Member Functions | |
D3D12_RESOURCE_DESC | DescribeTex2D (UINT width, UINT height, UINT depth_or_array_size, UINT num_mips, DXGI_FORMAT format, UINT flags) |
void | AssociateWithResource (const WString &name, ID3D12Resource *resource, const D3D12_RESOURCE_STATES ¤t_resource_state) |
void | CreateTextureResource (const WString &name, const D3D12_RESOURCE_DESC &resource_desc, const D3D12_CLEAR_VALUE &clear_value) |
Protected Member Functions inherited from blowbox::GpuResource | |
void | AddToMemoryProfiler () |
void | RemoveFromMemoryProfiler () |
Static Protected Member Functions | |
static DXGI_FORMAT | GetBaseFormat (DXGI_FORMAT format) |
static DXGI_FORMAT | GetUAVFormat (DXGI_FORMAT format) |
static DXGI_FORMAT | GetDSVFormat (DXGI_FORMAT format) |
static DXGI_FORMAT | GetDepthFormat (DXGI_FORMAT format) |
static DXGI_FORMAT | GetStencilFormat (DXGI_FORMAT format) |
Protected Attributes | |
UINT | width_ |
UINT | height_ |
UINT | array_size_ |
DXGI_FORMAT | format_ |
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_ |
Wrapper for pixel-type resources.
A buffer type for pixel-based resources like depth buffers and color buffers. This class is not usable in and of itself, but provides instead a bunch of helper functions for inheriting classes, such as format converters and texture creation.
blowbox::PixelBuffer::PixelBuffer | ( | ) |
Constructs a PixelBuffer resource.
|
protected |
Associates this PixelBuffer with a pre-existing resource (useful for stuff like SwapChain buffers)
[in] | name | The name for the resource (any previous names on the resource will be overridden) |
[in] | resource | The resource to associate this PixelBuffer with. |
[in] | current_resource_state | The resource state of the resource we're associating with. |
|
protected |
Creates a new texture resource for this PixelBuffer.
[in] | name | The name for this resource. |
[in] | resource_desc | The resource description for the resource to be created. |
[in] | clear_value | The default clear value for this resource. |
|
protected |
Generates a D3D12_RESOURCE_DESC for Texture2D resources.
[in] | width | The width of the Texture2D resource in pixels. |
[in] | height | The height of the Texture2D resource in pixels |
[in] | depth_or_array_size | The depth/array size of the resource. |
[in] | num_mips | The number of mip levels in the resource. |
[in] | format | The format of the resource. |
[in] | flags | Any flags that should be set on the resource. |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
inline |
|
inline |
|
staticprotected |
|
staticprotected |
|
inline |
|
protected |
The array size of the pixel buffer.
|
protected |
The format of the resource itself.
|
protected |
The height of the pixel buffer in texels.
|
protected |
The width of the pixel buffer in texels.