From 0eddc6e8d70f686de5196142dc2ada7bf5d2d075 Mon Sep 17 00:00:00 2001 From: Alexander Chehovsky Date: Sun, 30 Sep 2012 15:28:40 -0400 Subject: [PATCH] Enable VSync (Fix bug 5296) --- glxrender.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/glxrender.c b/glxrender.c index 8858479..5b2d902 100644 --- a/glxrender.c +++ b/glxrender.c @@ -30,6 +30,7 @@ static int plugin_id; typedef void (*BindEXTFunc)(Display *, GLXDrawable, int, const int *); typedef void (*ReleaseEXTFunc)(Display *, GLXDrawable, int); +typedef int (*SwapIntervalSGIFunc)(int); typedef struct { void (*screen_paint)(d_screen_t *sc); @@ -168,6 +169,11 @@ glxrender_init(d_screen_t *sc, int id) d->release_func = (ReleaseEXTFunc) glXGetProcAddress((const guchar*)"glXReleaseTexImageEXT"); + SwapIntervalSGIFunc swap_interval_func = (SwapIntervalSGIFunc) + glXGetProcAddress((const guchar*)"glXSwapIntervalSGI"); + if(swap_interval_func) + swap_interval_func(1); + glGenTextures(1, &d->root_texname); d->root_glpixmap = XCB_NONE; } -- 1.9.1