diff options
author | David Robillard <d@drobilla.net> | 2020-02-18 22:50:52 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-02-18 23:20:02 +0100 |
commit | 0059c630d7406f672c113d6dc6da78810160ddbb (patch) | |
tree | 789ede3ed59b6301245b823654e31662adeda726 /pugl/detail/mac_gl.m | |
parent | 2bae8905a97aa8a29826c78311c826d61f075e0e (diff) | |
download | pugl-0059c630d7406f672c113d6dc6da78810160ddbb.tar.gz pugl-0059c630d7406f672c113d6dc6da78810160ddbb.tar.bz2 pugl-0059c630d7406f672c113d6dc6da78810160ddbb.zip |
Pass expose event to backend enter and leave functions
This is needed for clipping. Unfortunately, the puglEnterContext() and
puglLeaveContext() API was not suitable for this, but this shouldn't matter in
user code because it is only used for setup, and is slated for removal anyway.
Instead, just call the backend functions directly in the implementation.
Diffstat (limited to 'pugl/detail/mac_gl.m')
-rw-r--r-- | pugl/detail/mac_gl.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pugl/detail/mac_gl.m b/pugl/detail/mac_gl.m index 145b614..07df642 100644 --- a/pugl/detail/mac_gl.m +++ b/pugl/detail/mac_gl.m @@ -125,7 +125,7 @@ puglMacGlDestroy(PuglView* view) } static PuglStatus -puglMacGlEnter(PuglView* view, bool PUGL_UNUSED(drawing)) +puglMacGlEnter(PuglView* view, const PuglEventExpose* PUGL_UNUSED(expose)) { PuglOpenGLView* const drawView = (PuglOpenGLView*)view->impl->drawView; @@ -134,11 +134,11 @@ puglMacGlEnter(PuglView* view, bool PUGL_UNUSED(drawing)) } static PuglStatus -puglMacGlLeave(PuglView* view, bool drawing) +puglMacGlLeave(PuglView* view, const PuglEventExpose* expose) { PuglOpenGLView* const drawView = (PuglOpenGLView*)view->impl->drawView; - if (drawing) { + if (expose) { [[drawView openGLContext] flushBuffer]; } |