aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail/x11_gl.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-09-19 13:30:57 +0200
committerDavid Robillard <d@drobilla.net>2020-09-19 18:51:34 +0200
commit44a7690c42b496e5332fa265e0308211c4afde45 (patch)
tree4a7b33d950dcdd26bb7bf06419a75d3e306fb1f3 /pugl/detail/x11_gl.c
parent181bd895918c341e0a2ef1d0558a591028bf2d7d (diff)
downloadpugl-44a7690c42b496e5332fa265e0308211c4afde45.tar.gz
pugl-44a7690c42b496e5332fa265e0308211c4afde45.tar.bz2
pugl-44a7690c42b496e5332fa265e0308211c4afde45.zip
Move puglX11GlEnter() and puglX11GlLeave() above puglX11GlCreate()
Diffstat (limited to 'pugl/detail/x11_gl.c')
-rw-r--r--pugl/detail/x11_gl.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/pugl/detail/x11_gl.c b/pugl/detail/x11_gl.c
index f78dbf3..969581b 100644
--- a/pugl/detail/x11_gl.c
+++ b/pugl/detail/x11_gl.c
@@ -115,6 +115,28 @@ puglX11GlConfigure(PuglView* view)
}
static PuglStatus
+puglX11GlEnter(PuglView* view, const PuglEventExpose* PUGL_UNUSED(expose))
+{
+ PuglX11GlSurface* surface = (PuglX11GlSurface*)view->impl->surface;
+ glXMakeCurrent(view->impl->display, view->impl->win, surface->ctx);
+ return PUGL_SUCCESS;
+}
+
+static PuglStatus
+puglX11GlLeave(PuglView* view, const PuglEventExpose* expose)
+{
+ PuglX11GlSurface* surface = (PuglX11GlSurface*)view->impl->surface;
+
+ if (expose && surface->double_buffered) {
+ glXSwapBuffers(view->impl->display, view->impl->win);
+ }
+
+ glXMakeCurrent(view->impl->display, None, NULL);
+
+ return PUGL_SUCCESS;
+}
+
+static PuglStatus
puglX11GlCreate(PuglView* view)
{
PuglInternals* const impl = view->impl;
@@ -176,28 +198,6 @@ puglX11GlDestroy(PuglView* view)
return PUGL_SUCCESS;
}
-static PuglStatus
-puglX11GlEnter(PuglView* view, const PuglEventExpose* PUGL_UNUSED(expose))
-{
- PuglX11GlSurface* surface = (PuglX11GlSurface*)view->impl->surface;
- glXMakeCurrent(view->impl->display, view->impl->win, surface->ctx);
- return PUGL_SUCCESS;
-}
-
-static PuglStatus
-puglX11GlLeave(PuglView* view, const PuglEventExpose* expose)
-{
- PuglX11GlSurface* surface = (PuglX11GlSurface*)view->impl->surface;
-
- if (expose && surface->double_buffered) {
- glXSwapBuffers(view->impl->display, view->impl->win);
- }
-
- glXMakeCurrent(view->impl->display, None, NULL);
-
- return PUGL_SUCCESS;
-}
-
PuglGlFunc
puglGetProcAddress(const char* name)
{