MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / ClearBuffers

Method ClearBuffers

GTE/Graphics/DX11/DX11Engine.cpp:1419–1440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1417}
1418
1419void DX11Engine::ClearBuffers()
1420{
1421 ID3D11RenderTargetView* rtViews[D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT] = { nullptr };
1422 ID3D11DepthStencilView* dsView = nullptr;
1423
1424 mImmediate->OMGetRenderTargets(mNumActiveRTs, rtViews, &dsView);
1425 for (uint32_t i = 0; i < mNumActiveRTs; ++i)
1426 {
1427 if (rtViews[i])
1428 {
1429 mImmediate->ClearRenderTargetView(rtViews[i], mClearColor.data());
1430 DX11::SafeRelease(rtViews[i]);
1431 }
1432 }
1433 if (dsView)
1434 {
1435 mImmediate->ClearDepthStencilView(dsView,
1436 D3D11_CLEAR_DEPTH | D3D11_CLEAR_STENCIL, mClearDepth,
1437 static_cast<UINT8>(mClearStencil));
1438 DX11::SafeRelease(dsView);
1439 }
1440}
1441
1442void DX11Engine::DisplayColorBuffer(uint32_t syncInterval)
1443{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected