aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-10-03 19:38:51 +0200
committerDavid Robillard <d@drobilla.net>2020-10-03 19:38:51 +0200
commit72f019e7071b4bbb09b71598d7f9f514bf50792e (patch)
tree46db8fc7d5e75825f24fa5773f24ed93ba347be1
parent630f0a381e051209c5e6df716522cafe97a804f2 (diff)
Store real double buffer value in hint and remove separate variable
-rw-r--r--pugl/detail/x11_gl.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/pugl/detail/x11_gl.c b/pugl/detail/x11_gl.c
index f5e6b8d..e4a0ea8 100644
--- a/pugl/detail/x11_gl.c
+++ b/pugl/detail/x11_gl.c
@@ -37,7 +37,6 @@
typedef struct {
GLXFBConfig fb_config;
GLXContext ctx;
- int double_buffered;
} PuglX11GlSurface;
static int
@@ -125,9 +124,7 @@ puglX11GlEnter(PuglView* view, const PuglEventExpose* PUGL_UNUSED(expose))
static PuglStatus
puglX11GlLeave(PuglView* view, const PuglEventExpose* expose)
{
- PuglX11GlSurface* surface = (PuglX11GlSurface*)view->impl->surface;
-
- if (expose && surface->double_buffered) {
+ if (expose && view->hints[PUGL_DOUBLE_BUFFER]) {
glXSwapBuffers(view->impl->display, view->impl->win);
}
@@ -183,7 +180,7 @@ puglX11GlCreate(PuglView* view)
glXGetConfig(impl->display,
impl->vi,
GLX_DOUBLEBUFFER,
- &surface->double_buffered);
+ &view->hints[PUGL_DOUBLE_BUFFER]);
return PUGL_SUCCESS;
}