本文整理汇总了C++中GraphicsContext::ClearDepthStencilTarget方法的典型用法代码示例。如果您正苦于以下问题:C++ GraphicsContext::ClearDepthStencilTarget方法的具体用法?C++ GraphicsContext::ClearDepthStencilTarget怎么用?C++ GraphicsContext::ClearDepthStencilTarget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GraphicsContext
的用法示例。
在下文中一共展示了GraphicsContext::ClearDepthStencilTarget方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RenderShadowDepth
void SDSMShadowManager::RenderShadowDepth(uint32 partitionIndex, RenderPassContext *renderPassContext, const D3DXMATRIX &lightViewProjMatrix, DynamicArray<SceneEntity*> &shadowEntities)
{
GraphicsContext *graphicsContext = mGraphicsManager->GetDirect3DManager()->GetContextManager()->GetGraphicsContext();
graphicsContext->TransitionResource(mShadowDepthTarget, D3D12_RESOURCE_STATE_DEPTH_WRITE, true);
graphicsContext->ClearDepthStencilTarget(mShadowDepthTarget->GetDepthStencilViewHandle().GetCPUHandle(), 1.0f, 0);
graphicsContext->SetDepthStencilTarget(mShadowDepthTarget->GetDepthStencilViewHandle().GetCPUHandle());
for (uint32 i = 0; i < shadowEntities.CurrentSize(); i++)
{
shadowEntities[i]->RenderShadows(renderPassContext, lightViewProjMatrix);
}
}