From efbd38a12119073f4b3fecea883cc2f11c298529 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 18 Apr 2015 20:24:51 +0100 Subject: [PATCH] OSX context fix, really --- dgl/src/pugl/pugl_osx.m | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/dgl/src/pugl/pugl_osx.m b/dgl/src/pugl/pugl_osx.m index ab6cc0a7..5909d67e 100644 --- a/dgl/src/pugl/pugl_osx.m +++ b/dgl/src/pugl/pugl_osx.m @@ -438,16 +438,13 @@ void puglLeaveContext(PuglView* view, bool flush) { #ifdef PUGL_HAVE_GL - if (view->ctx_type == PUGL_GL) { - if (flush) { - if (view->impl->glview->doubleBuffered) { - [[view->impl->glview openGLContext] flushBuffer]; - } else { - glFlush(); - } + if (view->ctx_type == PUGL_GL && flush) { + if (view->impl->glview->doubleBuffered) { + [[view->impl->glview openGLContext] flushBuffer]; + } else { + glFlush(); } - - [NSOpenGLContext clearCurrentContext]; + //[NSOpenGLContext clearCurrentContext]; } #endif }