Roderick Colenbrander : opengl: Fix Mesa/DRI regression.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Aug 28 05:09:16 CDT 2006
Module: wine
Branch: master
Commit: 336f34f652ee3d3142276e8043ae290fa7cfa974
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=336f34f652ee3d3142276e8043ae290fa7cfa974
Author: Roderick Colenbrander <thunderbird2k at gmx.net>
Date: Sun Aug 27 10:47:13 2006 +0000
opengl: Fix Mesa/DRI regression.
---
dlls/opengl32/wgl.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index f1efe8c..b3bcbed 100644
--- a/dlls/opengl32/wgl.c
+++ b/dlls/opengl32/wgl.c
@@ -583,7 +583,7 @@ static int describeDrawable(Wine_GLConte
int attribList[3] = { GLX_FBCONFIG_ID, 0, None };
GLXFBConfig *fbCfgs;
- if (3 > wine_glx.version || NULL == wine_glx.p_glXQueryDrawable) {
+ if (wine_glx.p_glXQueryDrawable == NULL) {
/** glXQueryDrawable not available so returns not supported */
return -1;
}
@@ -1302,6 +1302,10 @@ static void wgl_initialize_glx(Display *
* The versioning checks below try to take into account the comments from above.
*/
+ TRACE("Server GLX version: %s\n", server_glx_version);
+ TRACE("Client GLX version: %s\n", client_glx_version);
+ TRACE("Direct rendering eanbled: %s\n", glx_direct ? "True" : "False");
+
/* Based on the default opengl context we decide whether direct or indirect rendering is used.
* In case of indirect rendering we check if the GLX version of the server is 1.2 and else
* the client version is checked.
@@ -1326,7 +1330,6 @@ static void wgl_initialize_glx(Display *
wine_glx.p_glXGetVisualFromFBConfig = proc( (const GLubyte *) "glXGetVisualFromFBConfig");
/*wine_glx.p_glXGetFBConfigs = proc( (const GLubyte *) "glXGetFBConfigs");*/
- wine_glx.p_glXQueryDrawable = proc( (const GLubyte *) "glXQueryDrawable");
} else {
if (NULL != strstr(glx_extensions, "GLX_SGIX_fbconfig")) {
wine_glx.p_glXChooseFBConfig = proc( (const GLubyte *) "glXChooseFBConfigSGIX");
@@ -1336,6 +1339,15 @@ static void wgl_initialize_glx(Display *
ERR(" glx_version as %s and GLX_SGIX_fbconfig extension is unsupported. Expect problems.\n", client_glx_version);
}
}
+
+ /* The mesa libGL client library seems to forward glXQueryDrawable to the Xserver, so only
+ * enable this function when the Xserver understand GLX 1.3 or newer
+ */
+ if (!strcmp("1.2", server_glx_version))
+ wine_glx.p_glXQueryDrawable = NULL;
+ else
+ wine_glx.p_glXQueryDrawable = proc( (const GLubyte *) "glXQueryDrawable");
+
/** try anyway to retrieve that calls, maybe they works using glx client tricks */
wine_glx.p_glXGetFBConfigs = proc( (const GLubyte *) "glXGetFBConfigs");
wine_glx.p_glXMakeContextCurrent = proc( (const GLubyte *) "glXMakeContextCurrent");
More information about the wine-cvs
mailing list