WGL: rewrite context creation code [attempt 2]

Roderick Colenbrander thunderbird2k at gmail.com
Sun Nov 15 05:41:03 CST 2009


This is a slightly updated version of the patch. It restores a
describeContext call which got lost.

Roderick


---------- Forwarded message ----------
From: Roderick Colenbrander <thunderbird2k at gmail.com>
Date: Sun, Nov 15, 2009 at 12:24 PM
Subject: WGL: rewrite context creation code
To: wine-patches <wine-patches at winehq.org>


Hi,

This patch gets rid of the delayed GLX context creation which we
performed in WGL because of wglShareLists. I now try to create the GLX
context immediately and in wglShareLists I try to recreate a context
when sharing is requested. The reason I'm changing the code is because
OpenGL 3.0 can return a lot of error codes in
wglCreateContextAttribsARB which can't be caught before hand. I could
create a dummy context and delete but that is evil and AJ didn't like
that last year. The rewritten code should work as good (or as bad) as
the old code. I have tried the GL tests, a few GL apps and some of the
D3D tests.

At some point in the future I could also attempt to share lists
between all contexts by default and make wglShareLists a nop but this
is not guaranteed to work. When you attempt to share lists without the
app knowing it, it might invent its own texture ids without calling
glGen* and this could in theory cause issues.

Regards,
Roderick Colenbrander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Get-rid-of-delayed-GLX-context-creation.-Instead-att.patch
Type: text/x-diff
Size: 7118 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20091115/769bbff6/attachment-0001.patch>


More information about the wine-patches mailing list