Go to the documentation of this file.
40 template <
typename D3D_COMPARISON_FUNC>
62 template <
typename D3D_TEXTURE_ADDRESS_MODE>
79 template <
typename D3D_PRIM_TOPOLOGY>
82 static bool bIsInit =
false;
83 static std::array<D3D_PRIM_TOPOLOGY, PRIMITIVE_TOPOLOGY_NUM_TOPOLOGIES> d3dPrimTopology = {};
130 return d3dPrimTopology[Topology];
136 template <
typename D3D_FILL_MODE>
140 static bool bIsInit =
false;
141 static std::array<D3D_FILL_MODE, FILL_MODE_NUM_MODES> d3dFillModes = {};
151 auto d3dFillMode = d3dFillModes[FillMode];
152 VERIFY(d3dFillMode != 0,
"Incorrect fill mode");
157 UNEXPECTED(
"Incorrect fill mode (", FillMode,
")");
158 return static_cast<D3D_FILL_MODE
>(0);
162 template <
typename D3D_CULL_MODE>
166 static bool bIsInit =
false;
167 static std::array<D3D_CULL_MODE, CULL_MODE_NUM_MODES> d3dCullModes = {};
179 auto d3dCullMode = d3dCullModes[CullMode];
180 VERIFY(d3dCullMode != 0,
"Incorrect cull mode");
185 UNEXPECTED(
"Incorrect cull mode (", CullMode,
")");
186 return static_cast<D3D_CULL_MODE
>(0);
190 template <
typename D3D_RASTERIZER_DESC,
typename D3D_FILL_MODE,
typename D3D_CULL_MODE>
193 d3dRSDesc.FillMode = FillModeToD3DFillMode<D3D_FILL_MODE>(RasterizerDesc.
FillMode);
194 d3dRSDesc.CullMode = CullModeToD3DCullMode<D3D_CULL_MODE>(RasterizerDesc.
CullMode);
196 d3dRSDesc.DepthBias = RasterizerDesc.
DepthBias;
199 d3dRSDesc.DepthClipEnable = RasterizerDesc.
DepthClipEnable ? TRUE : FALSE;
204 d3dRSDesc.MultisampleEnable = d3dRSDesc.AntialiasedLineEnable;
211 template <
typename D3D_BLEND>
218 static bool bIsInit =
false;
219 static std::array<D3D_BLEND, BLEND_FACTOR_NUM_FACTORS> D3DBlend = {};
250 auto d3dbf = D3DBlend[bf];
251 VERIFY(d3dbf != 0,
"Incorrect blend factor");
256 UNEXPECTED(
"Incorrect blend factor (", bf,
")");
257 return static_cast<D3D_BLEND
>(0);
261 template <
typename D3D_BLEND_OP>
266 static bool bIsInit =
false;
267 static std::array<D3D_BLEND_OP, BLEND_OPERATION_NUM_OPERATIONS> D3DBlendOp = {};
283 auto d3dbop = D3DBlendOp[BlendOp];
284 VERIFY(d3dbop != 0,
"Incorrect blend operation");
289 UNEXPECTED(
"Incorrect blend operation (", BlendOp,
")");
290 return static_cast<D3D_BLEND_OP
>(0);
294 template <
typename D3D_BLEND_DESC,
typename D3D_BLEND,
typename D3D_BLEND_OP>
300 VERIFY(MAX_RENDER_TARGETS >= 8,
"Number of render targets is expected to be at least 8");
301 for (
int i = 0; i < 8; ++i)
304 auto& DstRTDesc = d3d12BlendDesc.RenderTarget[i];
305 DstRTDesc.
BlendEnable = SrcRTDesc.BlendEnable ? TRUE : FALSE;
307 DstRTDesc.SrcBlend = BlendFactorToD3DBlend<D3D_BLEND>(SrcRTDesc.SrcBlend);
308 DstRTDesc.DestBlend = BlendFactorToD3DBlend<D3D_BLEND>(SrcRTDesc.DestBlend);
309 DstRTDesc.BlendOp = BlendOperationToD3DBlendOp<D3D_BLEND_OP>(SrcRTDesc.BlendOp);
311 DstRTDesc.SrcBlendAlpha = BlendFactorToD3DBlend<D3D_BLEND>(SrcRTDesc.SrcBlendAlpha);
312 DstRTDesc.DestBlendAlpha = BlendFactorToD3DBlend<D3D_BLEND>(SrcRTDesc.DestBlendAlpha);
313 DstRTDesc.BlendOpAlpha = BlendOperationToD3DBlendOp<D3D_BLEND_OP>(SrcRTDesc.BlendOpAlpha);
315 DstRTDesc.RenderTargetWriteMask =
327 template <
typename D3D_STENCIL_OP>
330 static bool bIsInit =
false;
331 static std::array<D3D_STENCIL_OP, STENCIL_OP_NUM_OPS> StOpToD3DStOpMap = {};
350 auto d3dStencilOp = StOpToD3DStOpMap[StencilOp];
351 VERIFY(d3dStencilOp != 0,
"Unexpected stencil op");
357 return static_cast<D3D_STENCIL_OP
>(0);
361 template <
typename D3D_DEPTH_STENCILOP_DESC,
typename D3D_STENCIL_OP,
typename D3D_COMPARISON_FUNC>
365 D3D_DEPTH_STENCILOP_DESC D3DStOpDesc;
366 D3DStOpDesc.StencilFailOp = StencilOpToD3DStencilOp<D3D_STENCIL_OP>(StOpDesc.
StencilFailOp);
367 D3DStOpDesc.StencilDepthFailOp = StencilOpToD3DStencilOp<D3D_STENCIL_OP>(StOpDesc.
StencilDepthFailOp);
368 D3DStOpDesc.StencilPassOp = StencilOpToD3DStencilOp<D3D_STENCIL_OP>(StOpDesc.
StencilPassOp);
369 D3DStOpDesc.StencilFunc = ComparisonFuncToD3DComparisonFunc<D3D_COMPARISON_FUNC>(StOpDesc.
StencilFunc);
373 template <
typename D3D_DEPTH_STENCIL_DESC,
typename D3D_DEPTH_STENCILOP_DESC,
typename D3D_STENCIL_OP,
typename D3D_COMPARISON_FUNC>
377 d3dDSSDesc.DepthEnable = DepthStencilDesc.
DepthEnable ? TRUE : FALSE;
379 d3dDSSDesc.DepthFunc = ComparisonFuncToD3DComparisonFunc<D3D_COMPARISON_FUNC>(DepthStencilDesc.
DepthFunc);
380 d3dDSSDesc.StencilEnable = DepthStencilDesc.
StencilEnable ? TRUE : FALSE;
383 d3dDSSDesc.FrontFace = StencilOpDescToD3DStencilOpDesc<D3D_DEPTH_STENCILOP_DESC, D3D_STENCIL_OP, D3D_COMPARISON_FUNC>(DepthStencilDesc.
FrontFace);
384 d3dDSSDesc.BackFace = StencilOpDescToD3DStencilOpDesc<D3D_DEPTH_STENCILOP_DESC, D3D_STENCIL_OP, D3D_COMPARISON_FUNC>(DepthStencilDesc.
BackFace);
389 template <
typename D3D_INPUT_ELEMENT_DESC>
398 auto& D3DElem = D3DInputElements[iElem];
400 D3DElem.SemanticIndex = CurrElem.InputIndex;
401 D3DElem.AlignedByteOffset = CurrElem.RelativeOffset;
402 D3DElem.InputSlot = CurrElem.BufferSlot;
403 D3DElem.Format =
TypeToDXGI_Format(CurrElem.ValueType, CurrElem.NumComponents, CurrElem.IsNormalized);
410 template <
typename D3D_FILTER>
452 "For anistropic filtering, all filters must be anisotropic");
495 "For comparison anistropic filtering, all filters must be anisotropic");
538 "For minimum anistropic filtering, all filters must be anisotropic");
581 "For maximum anistropic filtering, all filters must be anisotropic");
#define D3D_FILL_MODE_WIREFRAME
Definition: D3D11TypeDefinitions.h:106
@ PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 25 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1112
@ COMPARISON_FUNC_LESS_EQUAL
Comparison passes if the source data is less than or equal to the destination data....
Definition: GraphicsTypes.h:950
#define D3D_FILTER_MIN_LINEAR_MAG_MIP_POINT
Definition: D3D11TypeDefinitions.h:38
#define D3D_STENCIL_OP_DECR
Definition: D3D11TypeDefinitions.h:94
#define D3D_BLEND_OP_REV_SUBTRACT
Definition: D3D11TypeDefinitions.h:131
@ PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 13 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1064
#define D3D_STENCIL_OP_ZERO
Definition: D3D11TypeDefinitions.h:88
@ PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 30 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1132
@ STENCIL_OP_KEEP
Keep the existing stencil data. Direct3D counterpart: D3D11_STENCIL_OP_KEEP/D3D12_STENCIL_OP_KEEP....
Definition: DepthStencilState.h:55
@ BLEND_OPERATION_REV_SUBTRACT
Subtract source color components from destination color components. Direct3D counterpart: D3D11_BLEN...
Definition: BlendState.h:153
#define D3D_BLEND_INV_DEST_ALPHA
Definition: D3D11TypeDefinitions.h:117
@ PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 14 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1068
#define D3D_FILTER_MIN_MAG_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:41
@ PRIMITIVE_TOPOLOGY_POINT_LIST
Interpret the vertex data as a list of points. D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_POINTLIST....
Definition: GraphicsTypes.h:1004
#define D3D_TEXTURE_ADDRESS_CLAMP
Definition: D3D11TypeDefinitions.h:148
#define D3D_TEXTURE_ADDRESS_WRAP
Definition: D3D11TypeDefinitions.h:146
#define D3D_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT
Definition: D3D11TypeDefinitions.h:71
#define D3D_FILTER_COMPARISON_MIN_MAG_MIP_POINT
Definition: D3D11TypeDefinitions.h:44
void DepthStencilStateDesc_To_D3D_DEPTH_STENCIL_DESC(const DepthStencilStateDesc &DepthStencilDesc, D3D_DEPTH_STENCIL_DESC &d3dDSSDesc)
Definition: D3DTypeConversionImpl.hpp:374
const char * HLSLSemantic
HLSL semantic. Default value ("ATTRIB") allows HLSL shaders to be converted to GLSL and used in OpenG...
Definition: InputLayout.h:69
@ PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 27 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1120
Bool IndependentBlendEnable
Specifies whether to enable independent blending in simultaneous render targets. If set to False,...
Definition: BlendState.h:382
#define D3D_STENCIL_OP_DECR_SAT
Definition: D3D11TypeDefinitions.h:91
#define D3D_COLOR_WRITE_ENABLE_BLUE
Definition: D3D11TypeDefinitions.h:138
TEXTURE_ADDRESS_MODE
Texture address mode.
Definition: GraphicsTypes.h:889
@ BLEND_FACTOR_INV_BLEND_FACTOR
The blend factor is one minus constant blend factor set with IDeviceContext::SetBlendFactors()....
Definition: BlendState.h:106
@ BLEND_FACTOR_INV_SRC1_ALPHA
The blend factor is 1-A, where A is the second alpha data output from a pixel shader....
Definition: BlendState.h:122
#define D3D_STENCIL_OP_INCR
Definition: D3D11TypeDefinitions.h:93
#define D3D_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:58
#define D3D_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:47
@ STENCIL_OP_UNDEFINED
Undefined operation.
Definition: DepthStencilState.h:51
#define D3D_STENCIL_OP_INCR_SAT
Definition: D3D11TypeDefinitions.h:90
@ BLEND_FACTOR_NUM_FACTORS
Helper value that stores the total number of blend factors in the enumeration.
Definition: BlendState.h:125
#define D3D_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT
Definition: D3D11TypeDefinitions.h:69
#define D3D_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:39
#define D3D_BLEND_INV_BLEND_FACTOR
Definition: D3D11TypeDefinitions.h:122
@ STENCIL_OP_DECR_WRAP
Decrement the current stencil value, and wrap the value to the maximum representable unsigned value w...
Definition: DepthStencilState.h:85
Bool AlphaToCoverageEnable
Specifies whether to use alpha-to-coverage as a multisampling technique when setting a pixel to a ren...
Definition: BlendState.h:378
@ STENCIL_OP_ZERO
Set the stencil data to 0. Direct3D counterpart: D3D11_STENCIL_OP_ZERO/D3D12_STENCIL_OP_ZERO....
Definition: DepthStencilState.h:59
@ BLEND_OPERATION_NUM_OPERATIONS
Helper value that stores the total number of blend operations in the enumeration.
Definition: BlendState.h:164
#define D3D_BLEND_INV_SRC1_ALPHA
Definition: D3D11TypeDefinitions.h:126
@ PRIMITIVE_TOPOLOGY_TRIANGLE_LIST
Interpret the vertex data as a list of triangles. D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_TRIANGLELI...
Definition: GraphicsTypes.h:996
#define D3D_INPUT_CLASSIFICATION_PER_INSTANCE_DATA
Definition: D3D11TypeDefinitions.h:143
#define D3D_COMPARISON_FUNC_GREATER_EQUAL
Definition: D3D11TypeDefinitions.h:83
#define D3D_BLEND_DEST_COLOR
Definition: D3D11TypeDefinitions.h:118
@ BLEND_OPERATION_UNDEFINED
Undefined blend operation.
Definition: BlendState.h:141
FILTER_TYPE
Filter type.
Definition: GraphicsTypes.h:864
Bool StencilEnable
Enable stencil opertaions. Default value: False.
Definition: DepthStencilState.h:173
#define UNEXPECTED(...)
Definition: DebugUtilities.hpp:77
@ PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 21 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1096
#define D3D_CULL_MODE_FRONT
Definition: D3D11TypeDefinitions.h:102
@ PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of three control point patches. D3D counterpart: D3D_PRIMITIVE_T...
Definition: GraphicsTypes.h:1024
STENCIL_OP StencilDepthFailOp
The stencil operation to perform when stencil testing passes and depth testing fails....
Definition: DepthStencilState.h:106
@ FILL_MODE_SOLID
Rasterize triangles using solid fill. Direct3D counterpart: D3D11_FILL_SOLID/D3D12_FILL_MODE_SOLID....
Definition: RasterizerState.h:57
@ PRIMITIVE_TOPOLOGY_LINE_STRIP
Interpret the vertex data as a line strip. D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_LINESTRIP....
Definition: GraphicsTypes.h:1012
@ PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of ten control point patches. D3D counterpart: D3D_PRIMITIVE_TOP...
Definition: GraphicsTypes.h:1052
FILL_MODE
Fill mode.
Definition: RasterizerState.h:46
@ PRIMITIVE_TOPOLOGY_LINE_LIST
Interpret the vertex data as a list of lines. D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_LINELIST....
Definition: GraphicsTypes.h:1008
PRIMITIVE_TOPOLOGY
Input primitive topology.
Definition: GraphicsTypes.h:989
@ BLEND_FACTOR_SRC_ALPHA_SAT
The blend factor is (f,f,f,1), where f = min(As, 1-Ad), As is alpha data from a pixel shader,...
Definition: BlendState.h:98
#define D3D_DEPTH_WRITE_MASK_ALL
Definition: D3D11TypeDefinitions.h:97
D3D_FILL_MODE FillModeToD3DFillMode(FILL_MODE FillMode)
Definition: D3DTypeConversionImpl.hpp:137
@ STENCIL_OP_REPLACE
Set the stencil data to the reference value set by calling IDeviceContext::SetStencilRef()....
Definition: DepthStencilState.h:63
@ PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 31 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1136
#define D3D_BLEND_OP_ADD
Definition: D3D11TypeDefinitions.h:129
#define D3D_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT
Definition: D3D11TypeDefinitions.h:48
Uint8 StencilWriteMask
Identify which bits of the depth-stencil buffer are accessed when writing stencil data....
Definition: DepthStencilState.h:181
COMPARISON_FUNCTION StencilFunc
A function that compares stencil data against existing stencil data. Default value: Diligent::COMPARI...
Definition: DepthStencilState.h:114
#define D3D_FILTER_COMPARISON_ANISOTROPIC
Definition: D3D11TypeDefinitions.h:52
@ PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 24 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1108
@ PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of nine control point patches. D3D counterpart: D3D_PRIMITIVE_TO...
Definition: GraphicsTypes.h:1048
#define D3D_BLEND_INV_SRC_ALPHA
Definition: D3D11TypeDefinitions.h:115
@ STENCIL_OP_INCR_WRAP
Increment the current stencil value, and wrap the value to zero when incrementing the maximum represe...
Definition: DepthStencilState.h:80
D3D_PRIM_TOPOLOGY TopologyToD3DTopology(PRIMITIVE_TOPOLOGY Topology)
Definition: D3DTypeConversionImpl.hpp:80
@ CULL_MODE_BACK
Do not draw triangles that are back-facing. Front- and back-facing triangles are determined by the Ra...
Definition: RasterizerState.h:86
@ COMPARISON_FUNC_LESS
Comparison passes if the source data is less than the destination data. Direct3D counterpart: D3D11_...
Definition: GraphicsTypes.h:942
#define D3D_BLEND_BLEND_FACTOR
Definition: D3D11TypeDefinitions.h:121
#define D3D_FILTER_MINIMUM_MIN_MAG_MIP_POINT
Definition: D3D11TypeDefinitions.h:55
@ BLEND_OPERATION_ADD
Add source and destination color components. Direct3D counterpart: D3D11_BLEND_OP_ADD/D3D12_BLEND_OP...
Definition: BlendState.h:145
#define D3D_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:60
@ PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of five control point patches. D3D counterpart: D3D_PRIMITIVE_TO...
Definition: GraphicsTypes.h:1032
@ COLOR_MASK_RED
Allow data to be stored in the red component.
Definition: BlendState.h:178
@ FILTER_TYPE_MINIMUM_ANISOTROPIC
Minimum-anisotropic filtering (DX12 only)
Definition: GraphicsTypes.h:875
@ PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP
Interpret the vertex data as a triangle strip. D3D counterpart: D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP...
Definition: GraphicsTypes.h:1000
@ FILTER_TYPE_MAXIMUM_LINEAR
Maximum-linear filtering (DX12 only)
Definition: GraphicsTypes.h:877
void RasterizerStateDesc_To_D3D_RASTERIZER_DESC(const RasterizerStateDesc &RasterizerDesc, D3D_RASTERIZER_DESC &d3dRSDesc)
Definition: D3DTypeConversionImpl.hpp:191
@ BLEND_FACTOR_INV_DEST_COLOR
The blend factor is 1-RGB, where RGB is the data from a render target. Direct3D counterpart: D3D11_B...
Definition: BlendState.h:93
@ FILTER_TYPE_MINIMUM_POINT
Minimum-point filtering (DX12 only)
Definition: GraphicsTypes.h:873
@ BLEND_OPERATION_MIN
Compute the minimum of source and destination color components. Direct3D counterpart: D3D11_BLEND_OP...
Definition: BlendState.h:157
Rasterizer state description.
Definition: RasterizerState.h:96
@ PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 32 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1140
D3D_DEPTH_STENCILOP_DESC StencilOpDescToD3DStencilOpDesc(const StencilOpDesc &StOpDesc)
Definition: D3DTypeConversionImpl.hpp:362
StencilOpDesc BackFace
Identify stencil operations for the back-facing triangles, see Diligent::StencilOpDesc.
Definition: DepthStencilState.h:187
Definition: STDAllocator.hpp:53
#define D3D_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:51
@ CULL_MODE_NUM_MODES
Helper value that stores the total number of cull modes in the enumeration.
Definition: RasterizerState.h:89
#define D3D_COMPARISON_FUNC_EQUAL
Definition: D3D11TypeDefinitions.h:79
Uint8 StencilReadMask
Identify which bits of the depth-stencil buffer are accessed when reading stencil data....
Definition: DepthStencilState.h:177
#define D3D_FILTER_MAXIMUM_ANISOTROPIC
Definition: D3D11TypeDefinitions.h:73
#define D3D_COLOR_WRITE_ENABLE_ALPHA
Definition: D3D11TypeDefinitions.h:139
BLEND_FACTOR
Blend factors.
Definition: BlendState.h:50
@ PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 23 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1104
@ BLEND_FACTOR_INV_SRC1_COLOR
The blend factor is 1-RGB, where RGB is the second RGB data output from a pixel shader....
Definition: BlendState.h:114
@ FILTER_TYPE_COMPARISON_LINEAR
Comparison-linear filtering.
Definition: GraphicsTypes.h:871
@ PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 29 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1128
@ PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 16 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1076
#define D3D_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:70
@ TEXTURE_ADDRESS_MIRROR_ONCE
Similar to TEXTURE_ADDRESS_MIRROR and TEXTURE_ADDRESS_CLAMP. Takes the absolute value of the texture ...
Definition: GraphicsTypes.h:917
#define D3D_BLEND_SRC_ALPHA
Definition: D3D11TypeDefinitions.h:114
Describes stencil operations that are performed based on the results of depth test.
Definition: DepthStencilState.h:98
#define D3D_COLOR_WRITE_ENABLE_RED
Definition: D3D11TypeDefinitions.h:136
Float32 SlopeScaledDepthBias
Scalar that scales the given pixel's slope before adding to the pixel's depth. Default value: 0.
Definition: RasterizerState.h:136
Bool BlendEnable
Enable or disable blending for this render target. Default value: False.
Definition: BlendState.h:279
Bool AntialiasedLineEnable
Specifies whether to enable line antialiasing. Default value: False.
Definition: RasterizerState.h:123
@ COMPARISON_FUNC_NEVER
Comparison never passes. Direct3D counterpart: D3D11_COMPARISON_NEVER/D3D12_COMPARISON_FUNC_NEVER....
Definition: GraphicsTypes.h:938
CULL_MODE
Cull mode.
Definition: RasterizerState.h:69
@ BLEND_FACTOR_UNDEFINED
Undefined blend factor.
Definition: BlendState.h:53
@ BLEND_FACTOR_SRC_ALPHA
The blend factor is alpha (A) data from a pixel shader. Direct3D counterpart: D3D11_BLEND_SRC_ALPHA/...
Definition: BlendState.h:73
@ STENCIL_OP_NUM_OPS
Helper value that stores the total number of stencil operations in the enumeration.
Definition: DepthStencilState.h:88
#define D3D_COMPARISON_FUNC_GREATER
Definition: D3D11TypeDefinitions.h:81
@ COMPARISON_FUNC_UNKNOWN
Unknown comparison function.
Definition: GraphicsTypes.h:934
#define D3D_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:45
#define D3D_COMPARISON_FUNC_NOT_EQUAL
Definition: D3D11TypeDefinitions.h:82
RenderTargetBlendDesc RenderTargets[DILIGENT_MAX_RENDER_TARGETS]
An array of RenderTargetBlendDesc structures that describe the blend states for render targets.
Definition: BlendState.h:386
@ BLEND_OPERATION_SUBTRACT
Subtract destination color components from source color components. Direct3D counterpart: D3D11_BLEN...
Definition: BlendState.h:149
#define D3D_CULL_MODE_NONE
Definition: D3D11TypeDefinitions.h:101
@ FILL_MODE_NUM_MODES
Helper value that stores the total number of fill modes in the enumeration.
Definition: RasterizerState.h:60
@ FILTER_TYPE_POINT
Point filtering.
Definition: GraphicsTypes.h:867
#define D3D_STENCIL_OP_REPLACE
Definition: D3D11TypeDefinitions.h:89
@ CULL_MODE_UNDEFINED
Undefined cull mode.
Definition: RasterizerState.h:72
#define D3D_BLEND_ONE
Definition: D3D11TypeDefinitions.h:111
D3D_CULL_MODE CullModeToD3DCullMode(CULL_MODE CullMode)
Definition: D3DTypeConversionImpl.hpp:163
#define D3D_TEXTURE_ADDRESS_MIRROR
Definition: D3D11TypeDefinitions.h:147
#define D3D_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:68
#define D3D_BLEND_SRC1_COLOR
Definition: D3D11TypeDefinitions.h:123
@ BLEND_FACTOR_ONE
The blend factor is one. Direct3D counterpart: D3D11_BLEND_ONE/D3D12_BLEND_ONE. OpenGL counterpart: ...
Definition: BlendState.h:61
COMPARISON_FUNCTION DepthFunc
A function that compares depth data against existing depth data. See Diligent::COMPARISON_FUNCTION fo...
Definition: DepthStencilState.h:170
@ CULL_MODE_FRONT
Do not draw triangles that are front-facing. Front- and back-facing triangles are determined by the R...
Definition: RasterizerState.h:81
STENCIL_OP StencilFailOp
The stencil operation to perform when stencil testing fails. Default value: Diligent::STENCIL_OP_KEEP...
Definition: DepthStencilState.h:102
#define D3D_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT
Definition: D3D11TypeDefinitions.h:57
@ PRIMITIVE_TOPOLOGY_NUM_TOPOLOGIES
Helper value that stores the total number of topologies in the enumeration.
Definition: GraphicsTypes.h:1143
Float32 DepthBiasClamp
Maximum depth bias of a pixel.
Definition: RasterizerState.h:132
#define D3D_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:72
uint32_t Uint32
32-bit unsigned integer
Definition: BasicTypes.h:51
@ COMPARISON_FUNC_GREATER_EQUAL
Comparison passes if the source data is greater than or equal to the destination data....
Definition: GraphicsTypes.h:962
@ PRIMITIVE_TOPOLOGY_UNDEFINED
Undefined topology.
Definition: GraphicsTypes.h:992
@ BLEND_FACTOR_ZERO
The blend factor is zero. Direct3D counterpart: D3D11_BLEND_ZERO/D3D12_BLEND_ZERO....
Definition: BlendState.h:57
@ BLEND_FACTOR_INV_DEST_ALPHA
The blend factor is 1-A, where A is alpha data from a render target. Direct3D counterpart: D3D11_BLE...
Definition: BlendState.h:85
@ TEXTURE_ADDRESS_MIRROR
Flip the texture at every integer junction. Direct3D Counterpart: D3D11_TEXTURE_ADDRESS_MIRROR/D3D1...
Definition: GraphicsTypes.h:900
#define D3D_BLEND_ZERO
Definition: D3D11TypeDefinitions.h:110
@ INPUT_ELEMENT_FREQUENCY_PER_VERTEX
Input data is per-vertex data.
Definition: InputLayout.h:53
@ BLEND_FACTOR_SRC_COLOR
The blend factor is RGB data from a pixel shader. Direct3D counterpart: D3D11_BLEND_SRC_COLOR/D3D12_...
Definition: BlendState.h:65
COMPARISON_FUNCTION
Comparison function.
Definition: GraphicsTypes.h:931
@ COMPARISON_FUNC_GREATER
Comparison passes if the source data is greater than the destination data. Direct3D counterpart: 3D1...
Definition: GraphicsTypes.h:954
@ STENCIL_OP_INCR_SAT
Increment the current stencil value, and clamp to the maximum representable unsigned value....
Definition: DepthStencilState.h:67
#define D3D_COMPARISON_FUNC_LESS
Definition: D3D11TypeDefinitions.h:78
#define D3D_COLOR_WRITE_ENABLE_GREEN
Definition: D3D11TypeDefinitions.h:137
@ PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 18 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1084
D3D_BLEND BlendFactorToD3DBlend(BLEND_FACTOR bf)
Definition: D3DTypeConversionImpl.hpp:212
@ BLEND_FACTOR_DEST_ALPHA
The blend factor is alpha (A) data from a render target. Direct3D counterpart: D3D11_BLEND_DEST_ALPH...
Definition: BlendState.h:81
#define D3D_TEXTURE_ADDRESS_MIRROR_ONCE
Definition: D3D11TypeDefinitions.h:150
#define D3D_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT
Definition: D3D11TypeDefinitions.h:46
#define D3D_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:49
#define D3D_FILTER_MIN_MAG_POINT_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:35
#define D3D_FILL_MODE_SOLID
Definition: D3D11TypeDefinitions.h:107
@ BLEND_FACTOR_INV_SRC_ALPHA
The blend factor is 1-A, where A is alpha data from a pixel shader. Direct3D counterpart: D3D11_BLEN...
Definition: BlendState.h:77
Bool DepthWriteEnable
Enable or disable writes to a depth buffer. Default value: True.
Definition: DepthStencilState.h:165
@ BLEND_FACTOR_BLEND_FACTOR
The blend factor is the constant blend factor set with IDeviceContext::SetBlendFactors()....
Definition: BlendState.h:102
@ PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 17 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1080
#define D3D_BLEND_INV_SRC1_COLOR
Definition: D3D11TypeDefinitions.h:124
@ PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 20 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1092
@ CULL_MODE_NONE
Draw all triangles. Direct3D counterpart: D3D11_CULL_NONE/D3D12_CULL_MODE_NONE. OpenGL counterpart:...
Definition: RasterizerState.h:76
#define D3D_COMPARISON_FUNC_LESS_EQUAL
Definition: D3D11TypeDefinitions.h:80
@ FILTER_TYPE_ANISOTROPIC
Anisotropic filtering.
Definition: GraphicsTypes.h:869
#define D3D_FILTER_MIN_MAG_MIP_POINT
Definition: D3D11TypeDefinitions.h:34
D3D_TEXTURE_ADDRESS_MODE TexAddressModeToD3DAddressMode(TEXTURE_ADDRESS_MODE Mode)
Definition: D3DTypeConversionImpl.hpp:63
@ PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 26 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1116
#define D3D_FILTER_MAXIMUM_MIN_MAG_MIP_POINT
Definition: D3D11TypeDefinitions.h:65
@ PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 12 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1060
@ STENCIL_OP_INVERT
Bitwise invert the current stencil buffer value. Direct3D counterpart: D3D11_STENCIL_OP_INVERT/D3D12...
Definition: DepthStencilState.h:75
@ PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of one control point patches. D3D counterpart: D3D_PRIMITIVE_TOP...
Definition: GraphicsTypes.h:1016
#define D3D_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT
Definition: D3D11TypeDefinitions.h:50
@ COMPARISON_FUNC_NOT_EQUAL
Comparison passes if the source data is not equal to the destination data. Direct3D counterpart: D3D...
Definition: GraphicsTypes.h:958
FILL_MODE FillMode
Determines traingle fill mode, see Diligent::FILL_MODE for details. Default value: Diligent::FILL_MOD...
Definition: RasterizerState.h:100
@ PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 15 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1072
@ FILTER_TYPE_MAXIMUM_POINT
Maximum-point filtering (DX12 only)
Definition: GraphicsTypes.h:876
@ PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of seven control point patches. D3D counterpart: D3D_PRIMITIVE_T...
Definition: GraphicsTypes.h:1040
@ FILTER_TYPE_MINIMUM_LINEAR
Minimum-linear filtering (DX12 only)
Definition: GraphicsTypes.h:874
#define D3D_CULL_MODE_BACK
Definition: D3D11TypeDefinitions.h:103
#define D3D_BLEND_SRC1_ALPHA
Definition: D3D11TypeDefinitions.h:125
STENCIL_OP
Stencil operation.
Definition: DepthStencilState.h:48
#define D3D_BLEND_SRC_COLOR
Definition: D3D11TypeDefinitions.h:112
@ PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 28 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1124
#define D3D_FILTER_MINIMUM_ANISOTROPIC
Definition: D3D11TypeDefinitions.h:63
@ BLEND_FACTOR_SRC1_ALPHA
The blend factor is the second alpha (A) data output from a pixel shader. Direct3D counterpart: D3D1...
Definition: BlendState.h:118
@ BLEND_FACTOR_SRC1_COLOR
The blend factor is the second RGB data output from a pixel shader. Direct3D counterpart: D3D11_BLEN...
Definition: BlendState.h:110
@ BLEND_OPERATION_MAX
Compute the maximum of source and destination color components. Direct3D counterpart: D3D11_BLEND_OP...
Definition: BlendState.h:161
#define D3D_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT
Definition: D3D11TypeDefinitions.h:59
#define D3D_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:66
#define D3D_BLEND_OP_MIN
Definition: D3D11TypeDefinitions.h:132
@ TEXTURE_ADDRESS_UNKNOWN
Unknown mode.
Definition: GraphicsTypes.h:892
#define D3D_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:56
@ FILL_MODE_UNDEFINED
Undefined fill mode.
Definition: RasterizerState.h:49
@ FILL_MODE_WIREFRAME
Rasterize triangles using wireframe fill. Direct3D counterpart: D3D11_FILL_WIREFRAME/D3D12_FILL_MOD...
Definition: RasterizerState.h:53
StencilOpDesc FrontFace
Identify stencil operations for the front-facing triangles, see Diligent::StencilOpDesc.
Definition: DepthStencilState.h:184
DXGI_FORMAT TypeToDXGI_Format(VALUE_TYPE ValType, Uint32 NumComponents, Bool bIsNormalized)
Definition: DXGITypeConversions.cpp:36
D3D_BLEND_OP BlendOperationToD3DBlendOp(BLEND_OPERATION BlendOp)
Definition: D3DTypeConversionImpl.hpp:262
@ BLEND_FACTOR_DEST_COLOR
The blend factor is RGB data from a render target. Direct3D counterpart: D3D11_BLEND_DEST_COLOR/D3D1...
Definition: BlendState.h:89
#define D3D_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT
Definition: D3D11TypeDefinitions.h:36
CULL_MODE CullMode
Determines traingle cull mode, see Diligent::CULL_MODE for details. Default value: Diligent::CULL_MOD...
Definition: RasterizerState.h:104
#define D3D_STENCIL_OP_KEEP
Definition: D3D11TypeDefinitions.h:87
@ PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 22 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1100
#define D3D_STENCIL_OP_INVERT
Definition: D3D11TypeDefinitions.h:92
@ COLOR_MASK_GREEN
Allow data to be stored in the green component.
Definition: BlendState.h:181
Int32 DepthBias
Constant value added to the depth of a given pixel. Default value: 0.
Definition: RasterizerState.h:127
@ COMPARISON_FUNC_EQUAL
Comparison passes if the source data is equal to the destination data. Direct3D counterpart: D3D11_C...
Definition: GraphicsTypes.h:946
#define D3D_BLEND_DEST_ALPHA
Definition: D3D11TypeDefinitions.h:116
@ PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of six control point patches. D3D counterpart: D3D_PRIMITIVE_TOP...
Definition: GraphicsTypes.h:1036
D3D_COMPARISON_FUNC ComparisonFuncToD3DComparisonFunc(COMPARISON_FUNCTION Func)
Definition: D3DTypeConversionImpl.hpp:41
@ FILTER_TYPE_LINEAR
Linear filtering.
Definition: GraphicsTypes.h:868
@ FILTER_TYPE_COMPARISON_ANISOTROPIC
Comparison-anisotropic filtering.
Definition: GraphicsTypes.h:872
#define D3D_BLEND_OP_MAX
Definition: D3D11TypeDefinitions.h:133
#define D3D_FILTER_MIN_MAG_LINEAR_MIP_POINT
Definition: D3D11TypeDefinitions.h:40
#define VERIFY_EXPR(...)
Definition: DebugUtilities.hpp:79
BLEND_OPERATION
Blending operation.
Definition: BlendState.h:138
@ TEXTURE_ADDRESS_CLAMP
Texture coordinates outside the range [0.0, 1.0] are set to the texture color at 0....
Definition: GraphicsTypes.h:905
#define D3D_BLEND_INV_DEST_COLOR
Definition: D3D11TypeDefinitions.h:119
Bool FrontCounterClockwise
Determines if a triangle is front- or back-facing. If this parameter is True, a triangle will be cons...
Definition: RasterizerState.h:111
D3D_STENCIL_OP StencilOpToD3DStencilOp(STENCIL_OP StencilOp)
Definition: D3DTypeConversionImpl.hpp:328
#define VERIFY(...)
Definition: DebugUtilities.hpp:76
#define D3D_BLEND_OP_SUBTRACT
Definition: D3D11TypeDefinitions.h:130
@ PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of two control point patches. D3D counterpart: D3D_PRIMITIVE_TOP...
Definition: GraphicsTypes.h:1020
#define D3D_DEPTH_WRITE_MASK_ZERO
Definition: D3D11TypeDefinitions.h:98
#define D3D_COMPARISON_FUNC_NEVER
Definition: D3D11TypeDefinitions.h:77
#define D3D_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:62
@ BLEND_FACTOR_INV_SRC_COLOR
The blend factor is 1-RGB, where RGB is the data from a pixel shader. Direct3D counterpart: D3D11_BL...
Definition: BlendState.h:69
#define D3D_INPUT_CLASSIFICATION_PER_VERTEX_DATA
Definition: D3D11TypeDefinitions.h:142
#define D3D_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT
Definition: D3D11TypeDefinitions.h:67
@ PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 19 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1088
#define D3D_BLEND_INV_SRC_COLOR
Definition: D3D11TypeDefinitions.h:113
STENCIL_OP StencilPassOp
The stencil operation to perform when stencil testing and depth testing both pass....
Definition: DepthStencilState.h:110
@ FILTER_TYPE_COMPARISON_POINT
Comparison-point filtering.
Definition: GraphicsTypes.h:870
@ PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of 11 control point patches. D3D counterpart: D3D_PRIMITIVE_TOPO...
Definition: GraphicsTypes.h:1056
#define D3D_BLEND_SRC_ALPHA_SAT
Definition: D3D11TypeDefinitions.h:120
@ PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of eight control point patches. D3D counterpart: D3D_PRIMITIVE_T...
Definition: GraphicsTypes.h:1044
@ COMPARISON_FUNC_ALWAYS
Comparison always passes. Direct3D counterpart: D3D11_COMPARISON_ALWAYS/D3D12_COMPARISON_FUNC_ALWAY...
Definition: GraphicsTypes.h:966
@ STENCIL_OP_DECR_SAT
Decrement the current stencil value, and clamp to 0. Direct3D counterpart: D3D11_STENCIL_OP_DECR_SAT...
Definition: DepthStencilState.h:71
Bool DepthEnable
Enable depth-stencil operations. When it is set to False, depth test always passes,...
Definition: DepthStencilState.h:162
@ FILTER_TYPE_MAXIMUM_ANISOTROPIC
Maximum-anisotropic filtering (DX12 only)
Definition: GraphicsTypes.h:878
#define D3D_FILTER_ANISOTROPIC
Definition: D3D11TypeDefinitions.h:42
Bool DepthClipEnable
Enable clipping against near and far clip planes. Default value: True.
Definition: RasterizerState.h:115
@ COLOR_MASK_ALPHA
Allow data to be stored in the alpha component.
Definition: BlendState.h:187
#define D3D_FILTER_MIN_POINT_MAG_MIP_LINEAR
Definition: D3D11TypeDefinitions.h:37
@ PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST
Interpret the vertex data as a list of four control point patches. D3D counterpart: D3D_PRIMITIVE_TO...
Definition: GraphicsTypes.h:1028
@ TEXTURE_ADDRESS_WRAP
Tile the texture at every integer junction. Direct3D Counterpart: D3D11_TEXTURE_ADDRESS_WRAP/D3D12_...
Definition: GraphicsTypes.h:896
#define D3D_TEXTURE_ADDRESS_BORDER
Definition: D3D11TypeDefinitions.h:149
@ TEXTURE_ADDRESS_BORDER
Texture coordinates outside the range [0.0, 1.0] are set to the border color specified in SamplerDesc...
Definition: GraphicsTypes.h:910
@ COLOR_MASK_BLUE
Allow data to be stored in the blue component.
Definition: BlendState.h:184
Depth stencil state description.
Definition: DepthStencilState.h:157
Blend state description.
Definition: BlendState.h:374
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37
void LayoutElements_To_D3D_INPUT_ELEMENT_DESCs(const InputLayoutDesc &InputLayout, std::vector< D3D_INPUT_ELEMENT_DESC, STDAllocatorRawMem< D3D_INPUT_ELEMENT_DESC >> &D3DInputElements)
Definition: D3DTypeConversionImpl.hpp:390
#define D3D_COMPARISON_FUNC_ALWAYS
Definition: D3D11TypeDefinitions.h:84
D3D_FILTER FilterTypeToD3DFilter(FILTER_TYPE MinFilter, FILTER_TYPE MagFilter, FILTER_TYPE MipFilter)
Definition: D3DTypeConversionImpl.hpp:411
#define D3D_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT
Definition: D3D11TypeDefinitions.h:61
void BlendStateDescToD3DBlendDesc(const BlendStateDesc &BSDesc, D3D_BLEND_DESC &d3d12BlendDesc)
Definition: D3DTypeConversionImpl.hpp:295