ID3D12GraphicsCommandList::OMSetStencilRef method
Sets the reference value for depth stencil tests.
Syntax
void OMSetStencilRef( [in] UINT StencilRef );
Parameters
- StencilRef [in]
-
Type: UINT
Reference value to perform against when doing a depth-stencil test.
Return value
This method does not return a value.
Examples
The D3D12Multithreading sample uses ID3D12GraphicsCommandList::OMSetStencilRef as follows:
void D3D12Multithreading::SetCommonPipelineState(ID3D12GraphicsCommandList* pCommandList) { pCommandList->SetGraphicsRootSignature(m_rootSignature.Get()); ID3D12DescriptorHeap* ppHeaps[] = { m_cbvSrvHeap.Get(), m_samplerHeap.Get() }; pCommandList->SetDescriptorHeaps(_countof(ppHeaps), ppHeaps); pCommandList->RSSetViewports(1, &m_viewport); pCommandList->RSSetScissorRects(1, &m_scissorRect); pCommandList->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); pCommandList->IASetVertexBuffers(0, 1, &m_vertexBufferView); pCommandList->IASetIndexBuffer(&m_indexBufferView); pCommandList->SetGraphicsRootDescriptorTable(3, m_samplerHeap->GetGPUDescriptorHandleForHeapStart()); pCommandList->OMSetStencilRef(0); // Render targets and depth stencil are set elsewhere because the // depth stencil depends on the frame resource being used. // Constant buffers are set elsewhere because they depend on the // frame resource being used. // SRVs are set elsewhere because they change based on the object // being drawn. }
See Example Code in the D3D12 Reference.
Requirements
|
Header |
|
|---|---|
|
Library |
|
|
DLL |
|
See also
Show: