WINED3D: In IWineD3DImpl_FillGLCaps use glGetString instead of glXGetClientString to retrieve the OpenGL vendor.

H. Verbeet hverbeet at gmail.com
Wed Jan 18 17:00:45 CST 2006


FillGLCaps uses glXGetClientString(display, GLX_VENDOR) to retrieve
the OpenGL vendor. It uses glGetString(GL_VERSION) to retrieve the
version. This causes a problem when the client and the server aren't
using OpenGL libraries by the same GL_VENDOR since glGetString asks
the server, ie the machine displaying the program, while
glXGetClientString asks the client. Using glGetString(GL_VENDOR) to
get the vendor fixes this.

Changelog:
  - In IWineD3DImpl_FillGLCaps, use glGetString instead of
glXGetClientString to retrieve the OpenGL vendor.
-------------- next part --------------
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index b9178a1..466d3e4 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -234,11 +234,11 @@ static BOOL IWineD3DImpl_FillGLCaps(Wine
     if (NULL != display) {
         test = glXQueryVersion(display, &major, &minor);
         gl_info->glx_version = ((major & 0x0000FFFF) << 16) | (minor & 0x0000FFFF);
-        gl_string = glXGetClientString(display, GLX_VENDOR);
     } else {
         FIXME("Display must not be NULL, use glXGetCurrentDisplay or getAdapterDisplay()\n");
-        gl_string = (const char *) glGetString(GL_VENDOR);
     }
+    gl_string = (const char *) glGetString(GL_VENDOR);
+
     TRACE_(d3d_caps)("Filling vendor string %s\n", gl_string);
     if (gl_string != NULL) {
         /* Fill in the GL vendor */


More information about the wine-patches mailing list