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

Method OnRender

Source/Engine/Graphics/RenderTask.cpp:104–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void RenderTask::OnRender(GPUContext* context)
105{
106 Render(this, context);
107
108 if (SwapChain)
109 {
110 PROFILE_GPU_CPU_NAMED("GUI");
111 const Viewport viewport(0, 0, static_cast<float>(SwapChain->GetWidth()), static_cast<float>(SwapChain->GetHeight()));
112 Render2D::Begin(context, SwapChain->GetBackBufferView(), nullptr, viewport);
113 SwapChain->GetWindow()->OnDraw();
114 Render2D::End();
115 }
116}
117
118void RenderTask::OnEnd(GPUContext* context)
119{

Callers

nothing calls this directly

Calls 8

GetWidthMethod · 0.80
GetWindowMethod · 0.80
RenderFunction · 0.70
BeginFunction · 0.50
EndFunction · 0.50
GetHeightMethod · 0.45
GetBackBufferViewMethod · 0.45
OnDrawMethod · 0.45

Tested by

no test coverage detected