MCPcopy Create free account
hub / github.com/LukasBanana/LLGL / OnDrawFrame

Method OnDrawFrame

examples/Cpp/Animation/Example.cpp:312–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310 }
311
312 void OnDrawFrame() override
313 {
314 // Update scene by user input
315 timer.MeasureTime();
316 UpdateScene(static_cast<float>(timer.GetDeltaTime()));
317
318 commands->Begin();
319 {
320 // Bind common input assembly
321 commands->SetVertexBuffer(*vertexBuffer);
322
323 // Render everything directly into the swap-chain
324 commands->BeginRenderPass(*swapChain);
325 {
326 commands->Clear(LLGL::ClearFlags::ColorDepth, backgroundColor);
327 commands->SetViewport(swapChain->GetResolution());
328 RenderScene();
329 }
330 commands->EndRenderPass();
331 }
332 commands->End();
333 commandQueue->Submit(*commands);
334 }
335
336};
337

Callers

nothing calls this directly

Calls 12

UpdateSceneFunction · 0.85
GetDeltaTimeMethod · 0.80
BeginMethod · 0.65
SetVertexBufferMethod · 0.65
BeginRenderPassMethod · 0.65
ClearMethod · 0.65
SetViewportMethod · 0.65
GetResolutionMethod · 0.65
EndRenderPassMethod · 0.65
EndMethod · 0.65
MeasureTimeMethod · 0.45
SubmitMethod · 0.45

Tested by

no test coverage detected