diff options
author | David Robillard <d@drobilla.net> | 2019-07-25 23:15:15 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-07-25 23:58:08 +0200 |
commit | 55199fe97d7866a0c8998455e43bb5b1f2989eb7 (patch) | |
tree | e63c8dc1154a0d49762c79fba3b775e45aa2794d | |
parent | 1249cf5e1081c13abb2ce7da477d3e95c6682cef (diff) | |
download | pugl-55199fe97d7866a0c8998455e43bb5b1f2989eb7.tar.gz pugl-55199fe97d7866a0c8998455e43bb5b1f2989eb7.tar.bz2 pugl-55199fe97d7866a0c8998455e43bb5b1f2989eb7.zip |
Clear GL context in puglLeaveContext() on all platforms
-rw-r--r-- | pugl/pugl_osx.m | 2 | ||||
-rw-r--r-- | pugl/pugl_win.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m index ba90ea3..2164597 100644 --- a/pugl/pugl_osx.m +++ b/pugl/pugl_osx.m @@ -739,6 +739,8 @@ puglLeaveContext(PuglView* view, bool flush) if (flush) { [[view->impl->glview openGLContext] flushBuffer]; } + + [NSOpenGLContext clearCurrentContext]; } static NSLayoutConstraint* diff --git a/pugl/pugl_win.c b/pugl/pugl_win.c index 8371b1e..1c93ea6 100644 --- a/pugl/pugl_win.c +++ b/pugl/pugl_win.c @@ -139,6 +139,7 @@ puglLeaveContext(PuglView* view, bool flush) } #endif + wglMakeCurrent(NULL, NULL); } static PIXELFORMATDESCRIPTOR |