X11DRV: fix fbconfig regression

Tomas Carnecky tom at dbservice.com
Fri Sep 15 20:58:54 CDT 2006


Tomas carnecky wrote:
> 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()

The spec: http://www.opengl.org/registry/specs/ARB/get_proc_address.txt
Section: 3.3.12 Obtaining Extension Function Pointers

---------------------

A non-NULL return value for glXGetProcAddressARB does not guarantee
that an extension function is actually supported at runtime. The
client must must also query glGetString(GL_EXTENSIONS) or
glXQueryExtensionsString to determine if an extension is supported
by a particular context.

[snip]

glXGetProcAddressARB may be queried for all of the following functions:

   - All GL and GLX extension functions supported by the
      implementation (whether those extensions are supported by the
      current context or not).

   - All core (non-extension) functions in GL and GLX from version
      1.0 up to and including the versions of those specifications
      supported by the implementation, as determined by
      glGetString(GL_VERSION) and glXQueryVersion queries.

---------------------


If the function is part of GLX version 'X' and glXQueryVersion returns 
'X' or higher OR if the function is part of an extension that is 
included in glXQueryExtensionsString THEN glXGetProcAddressARB returns a 
valid function.

I hope that clears things up :)

tom




More information about the wine-devel mailing list