Skip to content

Commit

Permalink
Add some earlier check_error() calls so that we do not get confusing …
Browse files Browse the repository at this point in the history
…behavior if there is already error on the entrance to render_to_fbo().
  • Loading branch information
sesse committed Nov 1, 2015
1 parent ade16d3 commit 15b0642
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions effect_chain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1648,7 +1648,9 @@ void EffectChain::render_to_fbo(GLuint dest_fbo, unsigned width, unsigned height

// This needs to be set anew, in case we are coming from a different context
// from when we initialized.
check_error();
glDisable(GL_DITHER);
check_error();

// Save original viewport.
GLuint x = 0, y = 0;
Expand All @@ -1663,6 +1665,7 @@ void EffectChain::render_to_fbo(GLuint dest_fbo, unsigned width, unsigned height
}

// Basic state.
check_error();
glDisable(GL_BLEND);
check_error();
glDisable(GL_DEPTH_TEST);
Expand Down

0 comments on commit 15b0642

Please sign in to comment.