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

Function UpdateScene

examples/Cpp/RenderTarget/Example.cpp:410–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408 }
409
410 void UpdateScene()
411 {
412 // Update scene animation (simple rotation)
413 if (input.KeyPressed(LLGL::Key::LButton))
414 rotation.x += static_cast<float>(input.GetMouseMotion().x)*0.005f;
415 if (input.KeyPressed(LLGL::Key::RButton))
416 rotation.y += static_cast<float>(input.GetMouseMotion().x)*0.005f;
417
418 // Check if user wants to sage the render target texture to file
419 if (input.KeyDown(LLGL::Key::F4))
420 SaveTexture(*renderTargetTex, "Screenshot." + GetModuleName() + ".png");
421 }
422
423 void DrawSceneIntoTexture()
424 {

Callers 10

OnDrawFrameMethod · 0.85
OnDrawFrameMethod · 0.85
OnDrawFrameFunction · 0.85
OnDrawFrameMethod · 0.85
OnDrawFrameMethod · 0.85
OnDrawFrameMethod · 0.85
OnDrawFrameMethod · 0.85
OnDrawFrameMethod · 0.85
OnDrawFrameMethod · 0.85
OnDrawFrameMethod · 0.85

Calls 4

KeyPressedMethod · 0.80
GetMouseMotionMethod · 0.80
KeyDownMethod · 0.80
GetModuleNameFunction · 0.50

Tested by

no test coverage detected