| 163 | } |
| 164 | |
| 165 | void Render() |
| 166 | { |
| 167 | // Run ray tracing |
| 168 | DXR::BuildCommandList(d3d, dxr, resources, &gui, &input); |
| 169 | |
| 170 | // Render GUI |
| 171 | gui.Render(d3d, resources); |
| 172 | |
| 173 | // End the frame and reste command list |
| 174 | D3D12::Present(d3d); |
| 175 | |
| 176 | if (input.captureScreenshot) D3D12::ScreenCapture(d3d, "screenshot"); |
| 177 | input.captureScreenshot = false; |
| 178 | |
| 179 | D3D12::MoveToNextFrame(d3d); |
| 180 | D3D12::ResetCommandList(d3d); |
| 181 | |
| 182 | // Cleanup temporary resources |
| 183 | D3DResources::ReleaseTemporaryBuffers(d3d, resources); |
| 184 | dxr.scratchBuffersCache.Reset(); |
| 185 | } |
| 186 | |
| 187 | void Cleanup() |
| 188 | { |
no test coverage detected