MCPcopy Create free account
hub / github.com/DiligentGraphics/DiligentFX / Render

Method Render

Components/src/BoundBoxRenderer.cpp:225–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225void BoundBoxRenderer::Render(IDeviceContext* pContext)
226{
227 if (pContext == nullptr)
228 {
229 UNEXPECTED("Context must not be null");
230 return;
231 }
232
233 if (m_pCurrentPSO == nullptr)
234 {
235 UNEXPECTED("Current PSO is null. Did you forget to call Prepare()?");
236 return;
237 }
238
239 if (m_pCurrentPSO->GetStatus() != PIPELINE_STATE_STATUS_READY || !m_SRB)
240 return;
241
242 pContext->SetPipelineState(m_pCurrentPSO);
243 pContext->CommitShaderResources(m_SRB, RESOURCE_STATE_TRANSITION_MODE_VERIFY);
244 DrawAttribs DrawAttrs{24, DRAW_FLAG_VERIFY_ALL};
245 pContext->Draw(DrawAttrs);
246}
247
248} // namespace Diligent

Callers

nothing calls this directly

Calls 2

SetPipelineStateMethod · 0.80
CommitShaderResourcesMethod · 0.80

Tested by

no test coverage detected