Commit c345488f authored by Michael Migliore's avatar Michael Migliore

Fix read and draw buffer save/restore in render window

We need to get read and draw buffer before binding the new fbo or
the buffers name will be wrong
parent 921d4ffd
Pipeline #119418 passed with stage
......@@ -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