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

Function ScaleResolution

examples/Cpp/ExampleBase/ExampleBase.cpp:468–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466}
467
468static LLGL::Extent2D ScaleResolution(const LLGL::Extent2D& res, float scale)
469{
470 const float wScaled = static_cast<float>(res.width) * scale;
471 const float hScaled = static_cast<float>(res.height) * scale;
472 return LLGL::Extent2D
473 {
474 static_cast<std::uint32_t>(wScaled + 0.5f),
475 static_cast<std::uint32_t>(hScaled + 0.5f)
476 };
477}
478
479static LLGL::Extent2D ScaleResolutionForDisplay(const LLGL::Extent2D& res, const LLGL::Display* display)
480{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected