From 1b31ac465dc63b2a2639c63267d2a351dd6ea8ea Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Thu, 3 Jun 2010 23:12:08 +0100 Subject: [PATCH] backend-glx: only check for GLX_SGI_video_sync for direct contexts The GLX_SGI_video_sync spec explicitly says that it's only supported for direct contexts so we don't setup up the function pointers if glXIsDirect () returns GL_FALSE. --- clutter/glx/clutter-backend-glx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clutter/glx/clutter-backend-glx.c b/clutter/glx/clutter-backend-glx.c index 0183177..eaadd0b 100644 --- a/clutter/glx/clutter-backend-glx.c +++ b/clutter/glx/clutter-backend-glx.c @@ -250,7 +250,11 @@ clutter_backend_glx_get_features (ClutterBackend *backend) * so we need to resort to manually synchronizing with the vblank so we * always check for the video_sync extension... */ - if (_cogl_check_extension ("GLX_SGI_video_sync", glx_extensions)) + if (_cogl_check_extension ("GLX_SGI_video_sync", glx_extensions) && + /* Note: the GLX_SGI_video_sync spec explicitly states this extension + * only works for direct contexts. */ + glXIsDirect (clutter_x11_get_default_display (), + backend_glx->gl_context)) { backend_glx->get_video_sync = (GetVideoSyncProc) cogl_get_proc_address ("glXGetVideoSyncSGI"); -- 2.7.4