MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetOutputViewport

Method GetOutputViewport

Source/Engine/Graphics/RenderTask.cpp:361–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361Viewport 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
376GPUTextureView* SceneRenderTask::GetOutputView() const
377{

Callers 3

RenderLightBufferFunction · 0.80
RenderInnerFunction · 0.80
DrawMethod · 0.80

Calls 6

GetViewportFunction · 0.85
IsAllocatedMethod · 0.80
GetWidthMethod · 0.80
ViewportClass · 0.70
GetBackBufferViewMethod · 0.45
GetHeightMethod · 0.45

Tested by

no test coverage detected