Commit 5352a9dc authored by Michael Migliore's avatar Michael Migliore Committed by Kitware Robot

Merge topic 'fix-fbo'

c345488f Fix read and draw buffer save/restore in render window
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit's avatarUtkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !4719
parents 19dd3555 c345488f
......@@ -100,10 +100,10 @@ public:
case READ:
{
glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING, reinterpret_cast<GLint*>(&this->LastFrameBuffer));
glBindFramebuffer(GL_READ_FRAMEBUFFER, fb);
#ifdef GL_READ_BUFFER
glGetIntegerv(GL_READ_BUFFER, &this->LastColorBuffer);
#endif
glBindFramebuffer(GL_READ_FRAMEBUFFER, fb);
glReadBuffer(buf);
}
break;
......@@ -111,10 +111,10 @@ public:
case DRAW:
{
glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, reinterpret_cast<GLint*>(&this->LastFrameBuffer));
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fb);
#ifdef GL_DRAW_BUFFER
glGetIntegerv(GL_DRAW_BUFFER, &this->LastColorBuffer);
#endif
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fb);
glDrawBuffer(buf);
}
break;
......
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