Roderick Colenbrander wrote:
There's this check: if ((!WineGLInfo.glxDirect && !strcmp("1.2", WineGLInfo.glxServerVersion)) || (WineGLInfo.glxDirect && !strcmp("1.2", WineGLInfo.glxClientVersion)))
This is not the correct way of loading opengl functions or deciding whether they are available or not. According to the GLX_ARB_get_proc_address spec, we need to check _only_ glXQueryExtensionsString() and glXQueryVersion() and it's not correct to make assumptions based on server/client versions or extension strings.
This patch removes all the client/server code and replaces it with the correct checks. The patch fixes the code in has_opengl() (and also replaces one wine_dlsym() with pglXGetProcAddressARB()) as well as the helper function glxRequireExtension() and fixes the code that decices whether pbuffers are available. Pbuffers are part of GLX 1.3, so if the GLX version is 1.3 we _have_ pbuffers, no need to check for the GLX_SGIX_pbuffers extension anymore (&& -> ||)
If this patch works with ATI drivers, I don't know, but that's certainly the correct way of querying functions.
tom