From aeda5009df68653d73a206586b939ebc4101c75e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 2 Sep 2012 19:07:59 +0200 Subject: [PATCH] Inlined simple function. --- src/Framebuffer.cpp | 4 ---- src/Framebuffer.h | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Framebuffer.cpp b/src/Framebuffer.cpp index d0f1d4cd2..062bd51f2 100644 --- a/src/Framebuffer.cpp +++ b/src/Framebuffer.cpp @@ -32,10 +32,6 @@ void Framebuffer::setFeature(Feature feature, bool enabled) { enabled ? clearMask |= clearMaskChange : clearMask &= ~clearMaskChange; } -void Framebuffer::setViewport(const Math::Vector2& position, const Math::Vector2& size) { - glViewport(position.x(), position.y(), size.x(), size.y()); -} - #ifndef MAGNUM_TARGET_GLES void Framebuffer::mapDefaultForDraw(std::initializer_list attachments) { GLenum* _attachments = new GLenum[attachments.size()]; diff --git a/src/Framebuffer.h b/src/Framebuffer.h index 4282e09ea..f66b93661 100644 --- a/src/Framebuffer.h +++ b/src/Framebuffer.h @@ -94,7 +94,9 @@ class MAGNUM_EXPORT Framebuffer { * Call when window size changes. * @see Camera::setViewport() */ - static void setViewport(const Math::Vector2& position, const Math::Vector2& size); + inline static void setViewport(const Math::Vector2& position, const Math::Vector2& size) { + glViewport(position.x(), position.y(), size.x(), size.y()); + } /*@}*/