| 102 | } |
| 103 | |
| 104 | void 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 | |
| 118 | void RenderTask::OnEnd(GPUContext* context) |
| 119 | { |