Skip to content

Commit

Permalink
FIX:calling sg_reset_state_cache produces opengl error 0x502
Browse files Browse the repository at this point in the history
fixes floooh#29
  • Loading branch information
pplux committed Jan 9, 2018
1 parent c7bc1b3 commit d39e6cc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions _sokol_gfx_gl.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2113,6 +2113,11 @@ _SOKOL_PRIVATE void _sg_update_image(_sg_image* img, const sg_image_content* dat
}

_SOKOL_PRIVATE void _sg_reset_state_cache() {
#if !defined(SOKOL_GLES2)
if (!_sg_gl_gles2) {
glBindVertexArray(_sg_gl.vao);
}
#endif
_sg_gl_reset_state_cache(&_sg_gl.cache);
}

Expand Down

0 comments on commit d39e6cc

Please sign in to comment.