diff --git a/src/Camera.cpp b/src/Camera.cpp index 309e29854..c37bc0559 100644 --- a/src/Camera.cpp +++ b/src/Camera.cpp @@ -115,11 +115,6 @@ void Camera::fixAspectRatio() { } else _projectionMatrix = rawProjectionMatrix; } -void Camera::setClearColor(const Magnum::Vector4& color) { - glClearColor(color.r(), color.g(), color.b(), color.a()); - _clearColor = color; -} - void Camera::draw() { Scene* s = scene(); CORRADE_ASSERT(s, "Camera: cannot draw without camera attached to scene", ) diff --git a/src/Camera.h b/src/Camera.h index da76f008d..167f85c57 100644 --- a/src/Camera.h +++ b/src/Camera.h @@ -69,6 +69,15 @@ class MAGNUM_EXPORT Camera: public Object { /** @brief Set feature */ static void setFeature(Feature feature, bool enabled); + /** + * @brief Set clear color + * + * Initial value is `{0.0f, 0.0f, 0.0f, 1.0f}`. + */ + inline static void setClearColor(const Vector4& color) { + glClearColor(color.r(), color.g(), color.b(), color.a()); + } + /** * @brief Constructor * @param parent Parent object @@ -140,12 +149,6 @@ class MAGNUM_EXPORT Camera: public Object { */ virtual void setViewport(const Math::Vector2& size); - /** @brief Clear color */ - inline Vector4 clearColor() const { return _clearColor; } - - /** @brief Set clear color */ - void setClearColor(const Vector4& color); - /** * @brief Draw the scene * @@ -185,7 +188,6 @@ class MAGNUM_EXPORT Camera: public Object { Matrix4 rawProjectionMatrix; Matrix4 _projectionMatrix; Matrix4 _cameraMatrix; - Vector4 _clearColor; GLfloat _near, _far; Math::Vector2 _viewport;