X11DRV: fix fbconfig regression

Tomas carnecky tom at dbservice.com
Fri Sep 15 11:41:04 CDT 2006

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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: opengl-functions.patch
Type: text/x-patch
Size: 5663 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20060915/f3199366/opengl-functions.bin

More information about the wine-devel mailing list