Hi,
Recently I am working on running MeeGo Handset UX inside VirtualBox with 3D
acceleration. With 3D acceleration on, Qt applications such as qtdemo and
mcompositor (window manager) could not start inside VirtualBox. After some
digging, I have found out that "GLX_ARB_get_proc_address" extension is missing.
After adding it, qtdemo and mcompositor runs well inside VirtualBox.
Here is the Qt logic, in Qt src/opengl/qgl_x11.cpp/QGLContext::getProcAddress,
"
if (!glXGetProcAddressARB) {
QGLExtensionMatcher extensions(glXGetClientString(QX11Info::display(),
GLX_EXTENSIONS));
if (extensions.match("GLX_ARB_get_proc_address")) {
#if defined(Q_OS_LINUX) || defined(Q_OS_BSD4)
void *handle = dlopen(NULL, RTLD_LAZY);
if (handle) {
glXGetProcAddressARB = (qt_glXGetProcAddressARB) dlsym(handle,
"glXGetProcAddressARB");
dlclose(handle);
}
if (!glXGetProcAddressARB)
#endif
{
#if !defined(QT_NO_LIBRARY)
extern const QString qt_gl_library_name();
QLibrary lib(qt_gl_library_name());
glXGetProcAddressARB = (qt_glXGetProcAddressARB)
lib.resolve("glXGetProcAddressARB");
#endif
}
}
resolved = true;
}
if (!glXGetProcAddressARB)
return 0;
"
So without this extension, the glXGetProcAddressARB is null and the qt
applications which use OpenGL will fail inside VirtualBox with 3D acceleration
on.
Currently I have not found any issue after enabling this extension.
The code patch is attached and I follow the MIT license.
Thanks
-Haitao
Index: src/VBox/Additions/common/crOpenGL/glx.c
===================================================================
--- src/VBox/Additions/common/crOpenGL/glx.c (revision 32017)
+++ src/VBox/Additions/common/crOpenGL/glx.c (working copy)
@@ -1099,7 +1099,7 @@
{
/* XXX maybe also advertise GLX_SGIS_multisample? */
- static const char *retval = "GLX_ARB_multisample GLX_EXT_texture_from_pixmap GLX_SGIX_fbconfig";
+ static const char *retval = "GLX_ARB_multisample GLX_EXT_texture_from_pixmap GLX_SGIX_fbconfig GLX_ARB_get_proc_address";
(void) dpy;
(void) screen;
_______________________________________________
vbox-dev mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-dev