Browse Source

Restore openGL state / unbind buffer

These changes make it possible to integrate nanoVG into other openGL libraries like Cinder and openFrameworks and be able to draw afterwards.
shared-context
Philipp Rockel 10 years ago
parent
commit
697bfd824d
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/nanovg_gl.h

+ 3
- 1
src/nanovg_gl.h View File

@@ -1070,7 +1070,9 @@ static void glnvg__renderFlush(void* uptr)
glDisableVertexAttribArray(1);
#if defined NANOVG_GL3
glBindVertexArray(0);
#endif
#endif
glDisable(GL_CULL_FACE);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glUseProgram(0);
glBindTexture(GL_TEXTURE_2D, 0);
}


Loading…
Cancel
Save