Commit 44fdb151 authored by Jan Möbius's avatar Jan Möbius
Browse files

Christopher: More snapshot patches. refs #373

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13747 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3d7cea9e
......@@ -1944,6 +1944,8 @@ void glViewer::snapshot(QImage& _image, int _width, int _height, bool _alpha, bo
if ( fb.isValid() ){
const GLuint prevFbo = ACG::GLState::getFramebufferDraw();
ACG::GLState::bindFramebuffer(GL_FRAMEBUFFER_EXT,fb.handle());
makeCurrent();
......@@ -1973,6 +1975,8 @@ void glViewer::snapshot(QImage& _image, int _width, int _height, bool _alpha, bo
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
paintGL();
glFinish();
ACG::GLState::bindFramebuffer(GL_FRAMEBUFFER_EXT, prevFbo);
// Reset alpha settings
if(_alpha)
......
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