Patch for opengl32.dll.so
bcoconni at club-internet.fr
Wed Nov 1 14:17:51 CST 2006
Roderick Colenbrander wrote :
>> On 11/1/06, Bertrand Coconnier <bcoconni at club-internet.fr> wrote:
>>> The last release of Wine 0.9.24 contains an error in the code of
>>> under X11 : Wine tries to get the address of "wglGetIntegerv" (line 608
>>> dlls/opengl32/wgl.c) before the extensions of WGL have actually been
>>> (i.e. before X11DRV_WineGL_LoadExtensions() is called). The reading of
>>> wglGetIntegerv address fails and afterwards, whenever
>>> is called, wine_wgl.p_wglGetIntegerv is NULL and a Fatal Exception is
>> This is probably already fixed in the git tree. See the commit:
>> winex11.drv: Fixed the prototype of many OpenGL functions.
> Else if the problem still happens something strange is going as the extensions are registered at x11drv startup.
Yes, the problem still happens because the function process_attach() (line 582
of dlls/opengl32/wgl.c) is called before the x11drv startup. The comment of
process_attach is very clear : "/* This is for brain-dead applications that use
OpenGL functions before even creating a rendering context.... */". It is clear
that process_attach is a workaround for *brain-dead* apps :) and among other
things it gets the address of wglGetIntegerv. This operation used to succeed as
long as GetProcAddress() was used but now since x11drv is needed to upload the
wglGetIntegerv address there is some kind of race condition and the operation
fails hence the bug.
More information about the wine-patches