This seems tangentially related to the recent MATLAB post on users@.
Obviously this is only a band-aid for the potential general issue
(assuming extensions exist in the 3D X server without actually
checking), but it is maybe the right band-aid, given I've never seen
issues related to this before.
-Nathan
>From cc3c6e1506e212e1163ec2d6c3bd4ffb7873bce8 Mon Sep 17 00:00:00 2001
From: Nathan Kidd <nk...@opentext.com>
Date: Mon, 1 Dec 2014 11:54:07 -0500
Subject: [PATCH 2/8] Only advertise GLX_ARB_create_context* extensions if
available
Avoids Mesa libGL failing with:
[VGL] ERROR: glXCreateContextAttribsARB symbol not loaded
Repo:
Run QT5 hellogl example on Mesa 10.x e.g. Ubuntu 14.04
---
server/faker-glx.cpp | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/server/faker-glx.cpp b/server/faker-glx.cpp
index 028368b..328174b 100644
--- a/server/faker-glx.cpp
+++ b/server/faker-glx.cpp
@@ -1013,15 +1013,24 @@ void glXFreeContextEXT(Display *dpy, GLXContext ctx)
// Since VirtualGL is effectively its own implementation of GLX, it needs to
// properly report the extensions and GLX version it supports.
-static const char *glxextensions=
- "GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_visual_info GLX_EXT_visual_rating GLX_SGI_make_current_read GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SUN_get_transparent_index GLX_ARB_create_context GLX_ARB_create_context_profile GLX_EXT_texture_from_pixmap GLX_EXT_swap_control GLX_SGI_swap_control";
+#define VGL_GLX_EXTENSIONS \
+ "GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_visual_info GLX_EXT_visual_rating GLX_SGI_make_current_read GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SUN_get_transparent_index GLX_EXT_texture_from_pixmap GLX_EXT_swap_control GLX_SGI_swap_control"
+#define VGL_GLX_ARB_CTX_EXTENSIONS \
+ " GLX_ARB_create_context GLX_ARB_create_context_profile"
+static const char *glxextensions=VGL_GLX_EXTENSIONS VGL_GLX_ARB_CTX_EXTENSIONS;
+static const char *glxextensions_no_arb_ctx=VGL_GLX_EXTENSIONS;
+const char *__vgl_glx_extensions(void)
+{
+ return __glXCreateContextAttribsARB ?
+ glxextensions : glxextensions_no_arb_ctx;
+}
const char *glXGetClientString(Display *dpy, int name)
{
// If this is called internally to OpenGL, use the real function
if(is3D(dpy)) return _glXGetClientString(dpy, name);
////////////////////
- if(name==GLX_EXTENSIONS) return glxextensions;
+ if(name==GLX_EXTENSIONS) return __vgl_glx_extensions();
else if(name==GLX_VERSION) return "1.4";
else if(name==GLX_VENDOR) return __APPNAME;
else return NULL;
@@ -1959,7 +1968,7 @@ const char *glXQueryExtensionsString(Display *dpy, int screen)
// If this is called internally to OpenGL, use the real function.
if(is3D(dpy)) return _glXQueryExtensionsString(dpy, screen);
////////////////////
- return glxextensions;
+ return __vgl_glx_extensions();
}
@@ -1970,7 +1979,7 @@ const char *glXQueryServerString(Display *dpy, int screen, int name)
// If this is called internally to OpenGL, use the real function.
if(is3D(dpy)) return _glXQueryServerString(dpy, screen, name);
////////////////////
- if(name==GLX_EXTENSIONS) return glxextensions;
+ if(name==GLX_EXTENSIONS) return __vgl_glx_extensions();
else if(name==GLX_VERSION) return "1.4";
else if(name==GLX_VENDOR) return __APPNAME;
else return NULL;
--
1.9.1
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
VirtualGL-Devel mailing list
VirtualGL-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtualgl-devel