Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
|
#include <pipeline_state.h>
Public Member Functions | |
GraphicsPSO () | |
~GraphicsPSO () | |
void | SetBlendState (const D3D12_BLEND_DESC &blend_desc) |
void | SetRasterizerState (const D3D12_RASTERIZER_DESC &rasterizer_desc) |
void | SetDepthStencilState (const D3D12_DEPTH_STENCIL_DESC &depth_stencil_desc) |
void | SetSampleMask (UINT sample_mask) |
void | SetPrimitiveTopologyType (D3D12_PRIMITIVE_TOPOLOGY_TYPE topology_type) |
void | SetRenderTargetFormat (DXGI_FORMAT rtv_format, DXGI_FORMAT dsv_format, UINT msaa_count=1, UINT msaa_quality=0) |
void | SetRenderTargetFormats (UINT num_rtvs, const DXGI_FORMAT *rtv_formats, DXGI_FORMAT dsv_format, UINT msaa_count=1, UINT msaa_quality=0) |
void | SetInputLayout (UINT num_elements, const D3D12_INPUT_ELEMENT_DESC *input_element_descs) |
void | SetPrimitiveRestart (D3D12_INDEX_BUFFER_STRIP_CUT_VALUE ib_props) |
void | SetVertexShader (const D3D12_SHADER_BYTECODE &binary) |
void | SetPixelShader (const D3D12_SHADER_BYTECODE &binary) |
void | SetGeometryShader (const D3D12_SHADER_BYTECODE &binary) |
void | SetHullShader (const D3D12_SHADER_BYTECODE &binary) |
void | SetDomainShader (const D3D12_SHADER_BYTECODE &binary) |
void | Finalize () override |
Public Member Functions inherited from blowbox::PSO | |
PSO () | |
void | SetRootSignature (RootSignature &root_signature) |
RootSignature & | GetRootSignature () |
ID3D12PipelineState * | operator-> () |
void | Destroy () |
ID3D12PipelineState * | GetPSO () const |
Protected Attributes | |
D3D12_GRAPHICS_PIPELINE_STATE_DESC | pso_desc_ |
D3D12_INPUT_ELEMENT_DESC | input_element_descs_ [16] |
Protected Attributes inherited from blowbox::PSO | |
ID3D12PipelineState * | pso_ |
RootSignature * | root_signature_ |
Wraps the PipelineStateObject for graphics pipelines.
This class inherits from the base PSO and is supposed to help make it simple to create PSO's for graphics pipelines. From the moment of initialisation by the constructor, you should call all the different Setters on this class to configure the PSO properly. Once you have done that, call GraphicsPSO::Finalize() and you are ready to use this PSO in your code.
blowbox::GraphicsPSO::GraphicsPSO | ( | ) |
Constructs the GraphicsPSO.
blowbox::GraphicsPSO::~GraphicsPSO | ( | ) |
Destructs the GraphicsPSO.
|
overridevirtual |
Finalizes the PSO by actually creating it.
Implements blowbox::PSO.
void blowbox::GraphicsPSO::SetBlendState | ( | const D3D12_BLEND_DESC & | blend_desc | ) |
Sets the blend state for this PSO.
[in] | blend_desc | The blend state description. |
void blowbox::GraphicsPSO::SetDepthStencilState | ( | const D3D12_DEPTH_STENCIL_DESC & | depth_stencil_desc | ) |
Sets the depth stencil state for this PSO.
[in] | depth_stencil_desc | The depth stencil state description. |
|
inline |
Sets this PSO's domain shader.
[in] | binary | The domain shader binary. |
|
inline |
Sets this PSO's geometry shader.
[in] | binary | The geometry shader binary. |
|
inline |
Sets this PSO's hull shader.
[in] | binary | The hull shader binary. |
void blowbox::GraphicsPSO::SetInputLayout | ( | UINT | num_elements, |
const D3D12_INPUT_ELEMENT_DESC * | input_element_descs | ||
) |
Sets the input layout on this PSO.
[in] | num_elements | The number of input elements. |
[in] | input_element_descs | An array of input element descriptions. |
|
inline |
Sets this PSO's pixel shader.
[in] | binary | The pixel shader binary. |
void blowbox::GraphicsPSO::SetPrimitiveRestart | ( | D3D12_INDEX_BUFFER_STRIP_CUT_VALUE | ib_props | ) |
Sets the primitive restart (whatever that means)
[in] | ib_props | Not a clue what this means, figure it out yourself. |
void blowbox::GraphicsPSO::SetPrimitiveTopologyType | ( | D3D12_PRIMITIVE_TOPOLOGY_TYPE | topology_type | ) |
Sets the primitive topology type for this PSO.
[in] | topology_type | The topology type that should be set. |
void blowbox::GraphicsPSO::SetRasterizerState | ( | const D3D12_RASTERIZER_DESC & | rasterizer_desc | ) |
Sets the rasterizer state for this PSO.
[in] | rasterizer_desc | The rasterizer state description. |
void blowbox::GraphicsPSO::SetRenderTargetFormat | ( | DXGI_FORMAT | rtv_format, |
DXGI_FORMAT | dsv_format, | ||
UINT | msaa_count = 1 , |
||
UINT | msaa_quality = 0 |
||
) |
void blowbox::GraphicsPSO::SetRenderTargetFormats | ( | UINT | num_rtvs, |
const DXGI_FORMAT * | rtv_formats, | ||
DXGI_FORMAT | dsv_format, | ||
UINT | msaa_count = 1 , |
||
UINT | msaa_quality = 0 |
||
) |
Sets the render targets in this PSO. Every format represents one render target.
[in] | num_rtvs | The number of RTVs. |
[in] | rtv_formats | An array of RTV formats. |
[in] | dsv_format | The DSV format to use. Use DXGI_FORMAT_UNKNOWN to unbind. |
[in] | msaa_count | The MSAA count on the rtv. |
[in] | msaa_quality | The quality of the MSAA applied. |
void blowbox::GraphicsPSO::SetSampleMask | ( | UINT | sample_mask | ) |
Sets the sample mask for this PSO.
[in] | sample_mask | The sample mask that should be set. |
|
inline |
Sets this PSO's vertex shader.
[in] | binary | The vertex shader binary. |
|
protected |
The input element descriptions.
|
protected |
The PSO description.