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

Function OnDrawFrame

examples/Cpp/RenderTarget/Example.cpp:536–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534 #endif // /ENABLE_CBUFFER_RANGE
535
536 void OnDrawFrame() override
537 {
538 // Update scene by user input
539 UpdateScene();
540
541 commands->Begin();
542 {
543 #if ENABLE_CBUFFER_RANGE
544
545 // Update constant buffer with all settings at once
546 UpdateSettingsForTexture(GetCbufferData(0));
547 UpdateSettingsForScreen(GetCbufferData(1));
548 commands->UpdateBuffer(*constantBuffer, 0, cbufferData.data(), static_cast<std::uint16_t>(cbufferData.size()));
549
550 #endif // /ENABLE_CBUFFER_RANGE
551
552 // Draw scene into texture, then draw scene onto screen
553 commands->PushDebugGroup("RenderTexture");
554 {
555 DrawSceneIntoTexture();
556 }
557 commands->PopDebugGroup();
558
559 commands->PushDebugGroup("RenderScreen");
560 {
561 DrawSceneOntoScreen();
562 }
563 commands->PopDebugGroup();
564 }
565 commands->End();
566 commandQueue->Submit(*commands);
567 }
568
569};
570

Callers 2

RunMethod · 0.85
DrawFrameMethod · 0.85

Calls 12

UpdateSceneFunction · 0.85
UpdateSettingsForTextureFunction · 0.85
UpdateSettingsForScreenFunction · 0.85
DrawSceneIntoTextureFunction · 0.85
DrawSceneOntoScreenFunction · 0.85
BeginMethod · 0.65
UpdateBufferMethod · 0.65
PushDebugGroupMethod · 0.65
PopDebugGroupMethod · 0.65
EndMethod · 0.65
sizeMethod · 0.45
SubmitMethod · 0.45

Tested by

no test coverage detected