| 343 | } |
| 344 | |
| 345 | Viewport SceneRenderTask::GetViewport() const |
| 346 | { |
| 347 | Viewport viewport; |
| 348 | if (Output) |
| 349 | viewport = Viewport(0, 0, static_cast<float>(Output->Width()), static_cast<float>(Output->Height())); |
| 350 | else if (SwapChain) |
| 351 | viewport = Viewport(0, 0, static_cast<float>(SwapChain->GetWidth()), static_cast<float>(SwapChain->GetHeight())); |
| 352 | else if (Buffers != nullptr) |
| 353 | viewport = Buffers->GetViewport(); |
| 354 | else |
| 355 | viewport = Viewport(0, 0, 1280, 720); |
| 356 | viewport.Width *= RenderingPercentage; |
| 357 | viewport.Height *= RenderingPercentage; |
| 358 | return viewport; |
| 359 | } |
| 360 | |
| 361 | Viewport SceneRenderTask::GetOutputViewport() const |
| 362 | { |
no test coverage detected