| 359 | } |
| 360 | |
| 361 | Viewport SceneRenderTask::GetOutputViewport() const |
| 362 | { |
| 363 | if (Output && Output->IsAllocated()) |
| 364 | return Viewport(0, 0, static_cast<float>(Output->Width()), static_cast<float>(Output->Height())); |
| 365 | if (SwapChain) |
| 366 | { |
| 367 | #if PLATFORM_WEB |
| 368 | // Hack fix for Web where swapchain texture might have different size than actual current size of the backbuffer, just precache it (GetBackBufferView might resize internally) |
| 369 | SwapChain->GetBackBufferView(); |
| 370 | #endif |
| 371 | return Viewport(0, 0, static_cast<float>(SwapChain->GetWidth()), static_cast<float>(SwapChain->GetHeight())); |
| 372 | } |
| 373 | return GetViewport(); |
| 374 | } |
| 375 | |
| 376 | GPUTextureView* SceneRenderTask::GetOutputView() const |
| 377 | { |
no test coverage detected