diff options
author | David Robillard <d@drobilla.net> | 2019-07-26 23:46:29 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-07-28 19:06:39 +0200 |
commit | 6a77f96642b201f614ce7eb67f3b6ec4e1e8c181 (patch) | |
tree | 051a02fcd8ffd6ec0a6c6fb8c1331a4a1592d99b /pugl/pugl_x11_gl.c | |
parent | 6a3159df3e41cfef6d94ff52f2cf9c5375254243 (diff) | |
download | pugl-6a77f96642b201f614ce7eb67f3b6ec4e1e8c181.tar.gz pugl-6a77f96642b201f614ce7eb67f3b6ec4e1e8c181.tar.bz2 pugl-6a77f96642b201f614ce7eb67f3b6ec4e1e8c181.zip |
Make enterContext take a drawing parameter like leaveContext
These need to be symmetric because sometimes different things need to happen in
either situation when entering the context as well.
Diffstat (limited to 'pugl/pugl_x11_gl.c')
-rw-r--r-- | pugl/pugl_x11_gl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pugl/pugl_x11_gl.c b/pugl/pugl_x11_gl.c index 46caaa0..1277404 100644 --- a/pugl/pugl_x11_gl.c +++ b/pugl/pugl_x11_gl.c @@ -150,7 +150,7 @@ puglX11GlDestroy(PuglView* view) } static int -puglX11GlEnter(PuglView* view) +puglX11GlEnter(PuglView* view, bool PUGL_UNUSED(drawing)) { PuglX11GlSurface* surface = (PuglX11GlSurface*)view->impl->surface; glXMakeCurrent(view->impl->display, view->impl->win, surface->ctx); @@ -158,13 +158,13 @@ puglX11GlEnter(PuglView* view) } static int -puglX11GlLeave(PuglView* view, bool flush) +puglX11GlLeave(PuglView* view, bool drawing) { PuglX11GlSurface* surface = (PuglX11GlSurface*)view->impl->surface; - if (flush && surface->double_buffered) { + if (drawing && surface->double_buffered) { glXSwapBuffers(view->impl->display, view->impl->win); - } else if (flush) { + } else if (drawing) { glFlush(); } |