diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2015-02-06 01:04:11 +0300 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2015-02-06 01:11:28 +0300 |
commit | 8e3168b2e796a16fcd7b1e53a22b1a228ffcdc69 (patch) | |
tree | 0c8d1274549ef7a17a6fd6c00516f230b3536d56 /macx | |
parent | 403aedb35db95bda81bdaa33b82065ee193f8cf3 (diff) |
Port ec7e78d1 to the OS X overlay.
Diffstat (limited to 'macx')
-rw-r--r-- | macx/overlay/overlay.m | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/macx/overlay/overlay.m b/macx/overlay/overlay.m index 13e09c3c6..992ecaf39 100644 --- a/macx/overlay/overlay.m +++ b/macx/overlay/overlay.m @@ -559,16 +559,21 @@ static void drawContext(Context * ctx, int width, int height) { glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); - int bound = 0; + int bound = 0, vbobound = 0; glGetIntegerv(GL_PIXEL_UNPACK_BUFFER_BINDING, &bound); + glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &vbobound); if (bound != 0) glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, 0); + if (vbobound != 0) + glBindBuffer(GL_ARRAY_BUFFER, 0); drawOverlay(ctx, width, height); if (bound != 0) glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, bound); + if (vbobound != 0) + glBindBuffer(GL_ARRAY_BUFFER, vbobound); glMatrixMode(GL_TEXTURE); glPopMatrix(); |