Browse Source

Inlined simple function.

pull/279/head
Vladimír Vondruš 14 years ago
parent
commit
aeda5009df
  1. 4
      src/Framebuffer.cpp
  2. 4
      src/Framebuffer.h

4
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<GLint>& position, const Math::Vector2<GLsizei>& size) {
glViewport(position.x(), position.y(), size.x(), size.y());
}
#ifndef MAGNUM_TARGET_GLES
void Framebuffer::mapDefaultForDraw(std::initializer_list<DefaultDrawAttachment> attachments) {
GLenum* _attachments = new GLenum[attachments.size()];

4
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<GLint>& position, const Math::Vector2<GLsizei>& size);
inline static void setViewport(const Math::Vector2<GLint>& position, const Math::Vector2<GLsizei>& size) {
glViewport(position.x(), position.y(), size.x(), size.y());
}
/*@}*/

Loading…
Cancel
Save