diff --git a/src/SceneGraph/Camera.cpp b/src/SceneGraph/Camera.cpp index 4d6d3f305..13484dfdc 100644 --- a/src/SceneGraph/Camera.cpp +++ b/src/SceneGraph/Camera.cpp @@ -47,8 +47,12 @@ template Matrix4 aspectRatioFix(AspectRatioPolicy, const Vector2&, cons template Camera::Camera(ObjectType* parent): ObjectType(parent), _aspectRatioPolicy(AspectRatioPolicy::NotPreserved) {} -template void Camera::setViewport(const Math::Vector2& size) { +template void Camera::setAspectRatioPolicy(AspectRatioPolicy policy) { + _aspectRatioPolicy = policy; + fixAspectRatio(); +} +template void Camera::setViewport(const Math::Vector2& size) { _viewport = size; fixAspectRatio(); } diff --git a/src/SceneGraph/Camera.h b/src/SceneGraph/Camera.h index df3f82e61..b3104292c 100644 --- a/src/SceneGraph/Camera.h +++ b/src/SceneGraph/Camera.h @@ -73,7 +73,7 @@ template { void projection2D(); void orthographic(); void perspective(); + void projectionSizeViewport(); }; }}}