Skip to content

Commit

Permalink
Bug fix, where the framebuffer was left in ruins
Browse files Browse the repository at this point in the history
  • Loading branch information
straubar committed Nov 26, 2019
1 parent 0ad194b commit eef6451
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/src/view/SplitView.cpp
Expand Up @@ -148,10 +148,17 @@ void view::SplitView::Render(const mmcRenderViewContext& context) {
}

// Bind and blit framebuffer.
GLint binding, readBuffer;
glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING, &binding);
glGetIntegerv(GL_READ_BUFFER, &readBuffer);

glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo.GetID());
glReadBuffer(GL_COLOR_ATTACHMENT0);
glBlitFramebuffer(0, 0, fbo.GetWidth(), fbo.GetHeight(), ca.Left(), this->clientArea.Height() - ca.Top(),
ca.Right(), this->clientArea.Height() - ca.Bottom(), GL_COLOR_BUFFER_BIT, GL_NEAREST);

glBindFramebuffer(GL_READ_FRAMEBUFFER, binding);
glReadBuffer(readBuffer);
};

// Draw the splitter through clearing without overplotting.
Expand Down

0 comments on commit eef6451

Please sign in to comment.