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

Method OnResize

examples/Cpp/ExampleBase/ExampleBase.cpp:283–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283void ExampleBase::WindowEventHandler::OnResize(LLGL::Window& sender, const LLGL::Extent2D& clientAreaSize)
284{
285 const auto& resolution = clientAreaSize;
286
287 // Update projection matrix
288 auto aspectRatio = static_cast<float>(resolution.width) / static_cast<float>(resolution.height);
289 projection_ = app_.PerspectiveProjection(aspectRatio, 0.1f, 100.0f, Gs::Deg2Rad(45.0f));
290
291 // Notify application about resize event
292 app_.Resize(resolution);
293}
294
295void ExampleBase::WindowEventHandler::OnUpdate(LLGL::Window& sender)
296{

Callers

nothing calls this directly

Calls 2

PerspectiveProjectionMethod · 0.80
ResizeMethod · 0.45

Tested by

no test coverage detected