Commit aeb8b8cb authored by Matthias Möller's avatar Matthias Möller

fix screenshot buffer creation (fixes screenshot with multiple instances of OF)

refs #2361

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20757 383ad7c9-94d9-4d36-a494-682f7c89f535
parent bc825851
......@@ -2265,13 +2265,14 @@ void glViewer::snapshot(QImage& _image, int _width, int _height, bool _alpha, bo
// 16 samples per pixel as we want a nice snapshot. If this is not supported
// it will fall back to the maximal supported number of samples
format.setSamples(samples);
makeCurrent();
QFramebufferObject fb(w,h,format);
if ( fb.isValid() ){
const GLuint prevFbo = ACG::GLState::getFramebufferDraw();
makeCurrent();
ACG::GLState::bindFramebuffer(GL_FRAMEBUFFER_EXT, fb.handle());
// Turn alpha on if demanded
......
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