winex11.drv: cleanup better in X11DRV_WineGL_InitOpenglInfo

Jesse Allen the3dfxdude at
Thu Sep 14 17:24:19 CDT 2006

On 9/14/06, Phil Costin <philcostin at> wrote:
> This patch fixes many games for me, what is the reason it was not applied?
> Regards
> Phil Costin

I don't know myself either. I was just going to wait. I want to add a
little more to say about it.

It's funny that the patch was only meant to affect the opengl/wgl code
and the crashing apps are all d3d ones. However winex11 will now
change the context on it's own when doing the opengl query and not set
it back. What I noticed a couple weeks ago and now is that winex11
does usually gets inited twice, therefore it will change the current
context twice. One at the start of the program, and another later on
-- maybe on creation of a window or something. By that time wined3d is
probably inited too, and making glXMakeCurrent calls too since it's
based on opengl. So perhaps winex11 is causing wined3d to trip up at
some point by changing the context. So if InitOpenglInfo just sets
things back, then wined3d won't go boom.

>From comments in wined3d, I can tell there isn't any "context
manager". So what wined3d does at most is very simple management of
contextes. We probably need a manager to coordinate things like this
better between the two libraries. But that will likely be a bigger
patch and to do so... I don't know, we need a fix for all the broken
d3d apps now.


More information about the wine-patches mailing list