Commit 118bb540 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'fixSnapshot' into 'master'

Fix snapshot

Closes #2

See merge request !33
parents d4465c46 bb02df16
......@@ -571,14 +571,14 @@ int main(int argc, char **argv)
}
}
}
// After setting all Options from command line, build the real gui
w->init();
#ifndef __APPLE__
initGlew();
#endif
// After setting all Options from command line, build the real gui
w->init();
const QStringList positionalArguments = parser.positionalArguments();
for ( auto file: positionalArguments ) {
......
......@@ -226,7 +226,18 @@ glViewer::~glViewer()
void glViewer::makeCurrent() {
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,4))
const GLuint prevFbo = ACG::GLState::getFramebufferDraw();
#endif
// calling makeCurrent binds the default FBO when QOpenGLWidget is used
glWidget_->makeCurrent();
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,4))
//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);
#endif
}
......
Markdown is supported
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