MCPcopy Create free account
hub / github.com/Apress/Ray-Tracing-Gems-II / Present

Function Present

Chapter_14/src/Graphics.cpp:904–912  ·  view source on GitHub ↗

* Swap the buffers. */

Source from the content-addressed store, hash-verified

902 * Swap the buffers.
903 */
904void Present(D3D12Global &d3d)
905{
906 HRESULT hr = d3d.swapChain->Present(d3d.vsync, (!d3d.vsync && d3d.isTearingSupport) ? DXGI_PRESENT_ALLOW_TEARING : 0);
907 if (FAILED(hr))
908 {
909 hr = d3d.device->GetDeviceRemovedReason();
910 Utils::Validate(hr, L"Error: failed to present!");
911 }
912}
913
914/*
915* Wait for pending GPU work to complete.

Callers 2

RenderMethod · 0.85
UpdateApplicationFunction · 0.85

Calls 2

ValidateFunction · 0.85
PresentMethod · 0.45

Tested by

no test coverage detected