24 #include "hx3d/graphics/viewports/fit_viewport.hpp" 28 #include "hx3d/utils/log.hpp" 40 float tgtRatio, srcRatio, scale;
void apply(Camera &camera)
Apply the viewport on the screen, centering the camera.
float _worldHeight
World height.
virtual void internalUpdate(Camera &camera) override
Update the viewport, centering the camera (internal).
int _screenHeight
Screen height.
int _screenWidth
Screen width.
FitViewport(const float worldWidth, const float worldHeight)
Create a fit viewport using a world width and height.
float _worldWidth
World width.