Skip to content

Commit

Permalink
Canvas3DBase: fix offscreen rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
carrotIndustries committed Feb 18, 2021
1 parent 5d41bb2 commit 1b6f3a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/canvas3d/canvas3d_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ void Canvas3DBase::render(RenderBackground mode)

glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fb);
glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo);
glDrawBuffer(GL_COLOR_ATTACHMENT0);
glDrawBuffer(fb ? GL_COLOR_ATTACHMENT0 : GL_FRONT);
glReadBuffer(GL_COLOR_ATTACHMENT0);
glBlitFramebuffer(0, 0, width * a_get_scale_factor(), height * a_get_scale_factor(), 0, 0,
width * a_get_scale_factor(), height * a_get_scale_factor(), GL_COLOR_BUFFER_BIT, GL_NEAREST);
Expand Down

0 comments on commit 1b6f3a6

Please sign in to comment.