Commit e6b310fc authored by Christopher Tenter's avatar Christopher Tenter

assumption that the drawbuffer is always GL_BACK might be problematic refs #2361

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20195 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 73863806
...@@ -643,6 +643,13 @@ void glViewer::drawScene() ...@@ -643,6 +643,13 @@ void glViewer::drawScene()
// //
// } // }
// save hardware backbuffer
GLuint backbufferFbo = 0;
GLuint backbufferTarget = 0;
glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, (GLint*)&backbufferFbo);
glGetIntegerv(GL_DRAW_BUFFER, (GLint*)&backbufferTarget);
// Clear back buffer here: // Clear back buffer here:
// Render plugins do not have to worry about using scissor test for clearing their viewports later on. // Render plugins do not have to worry about using scissor test for clearing their viewports later on.
glClearColor(properties_.backgroundColor()[0], properties_.backgroundColor()[1], glClearColor(properties_.backgroundColor()[0], properties_.backgroundColor()[1],
...@@ -731,11 +738,6 @@ void glViewer::drawScene() ...@@ -731,11 +738,6 @@ void glViewer::drawScene()
// Post-Processing pipeline // Post-Processing pipeline
if (numPostProcessors || stereoAnaglyph) { if (numPostProcessors || stereoAnaglyph) {
GLuint backbufferFbo = 0;
GLuint backbufferTarget = 0;
glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, (GLint*)&backbufferFbo);
glGetIntegerv(GL_DRAW_BUFFER, (GLint*)&backbufferTarget);
updatePostProcessingBufs(glstate_->viewport_width(),glstate_->viewport_height()); updatePostProcessingBufs(glstate_->viewport_width(),glstate_->viewport_height());
...@@ -871,7 +873,7 @@ void glViewer::drawScene() ...@@ -871,7 +873,7 @@ void glViewer::drawScene()
// ================================================================================= // =================================================================================
glDrawBuffer(GL_BACK); glDrawBuffer(backbufferTarget);
// unbind vbo for qt log window // unbind vbo for qt log window
ACG::GLState::bindBuffer(GL_ARRAY_BUFFER, 0); ACG::GLState::bindBuffer(GL_ARRAY_BUFFER, 0);
......
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