| 223 | } |
| 224 | |
| 225 | void 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 |
nothing calls this directly
no test coverage detected