Commit bb02df16 authored by Martin Schultz's avatar Martin Schultz
Browse files

store and restore bound fbo when makeCurrent is called for


fixes #2
parent 014ec481
......@@ -226,7 +226,18 @@ glViewer::~glViewer()
void glViewer::makeCurrent() {
const GLuint prevFbo = ACG::GLState::getFramebufferDraw();
// calling makeCurrent binds the default FBO when QOpenGLWidget is used
//restore the previously bound FBO, if it was not 0 as Qt Documentation says we shall not bind 0
if(prevFbo != 0)
ACG::GLState::bindFramebuffer(GL_FRAMEBUFFER, prevFbo);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment