Browse Source

Don't reset viewport if binding framebuffer for reading only.

Caused assertion. Anyway, I need to clean up that mess with framebuffer
binding. Nobody needs to bind it for reading.
pull/87/head
Vladimír Vondruš 12 years ago
parent
commit
bd8db7e66b
  1. 5
      src/Magnum/AbstractFramebuffer.cpp

5
src/Magnum/AbstractFramebuffer.cpp

@ -93,8 +93,11 @@ void AbstractFramebuffer::createIfNotAlready() {
CORRADE_INTERNAL_ASSERT(_created); CORRADE_INTERNAL_ASSERT(_created);
} }
void AbstractFramebuffer::bind(FramebufferTarget target) { void AbstractFramebuffer::bind(const FramebufferTarget target) {
bindInternal(target); bindInternal(target);
/* Ensure the viewport is set if the user is going to draw */
if(target == FramebufferTarget::Draw || target == FramebufferTarget::ReadDraw)
setViewportInternal(); setViewportInternal();
} }

Loading…
Cancel
Save