[wined3d] Status update: Converting Wined3d to use WGL instead of GLX

Aric Cyr Aric.Cyr at gmail.com
Wed Jan 11 20:17:11 CST 2006


Hi all,

Just wanted to chime in with a status update on my porting of wined3d to WGL.

Basically, I am in the debug phase, and at this point most bugs have been ironed
out.  That is, for dx9 stuff.  I soon ran into problems/regressions with dx8 or
lower (including ddraw!).  So I ended up repeating the (almost) exactly same
work for d3d8 and ddraw... not a pretty sight, and a pain to debug them all.

As a result this conversion has become a fairly large and invasive change
affecting all versions of directx... [I can't wait for all these to be
completely ported to wined3d].

For testing d3d8 I've been using 3DMark2001SE and some DirectX tutorial/demo
apps.  For d3d9 I use World of Warcraft (hehe) and more tutorial/demo apps.  I
forget what I used for d3d7 though... I'll have to double check that.

Most of the problems I've come across were GLXContext related... namely due to a
problem in wine's wgl which causes an app to think there is a current context,
when infact there isn't. (See wglGetCurrentContext in wgl.c, and see what
happens when there is no glX context, especially between calls to
wglCreateContext and wglMakeCurrent).

Another change I made which I'm not sure about and would like feedback for, is
to change wgl's process_attach to use wgl functions instead of glX functions. 
The reason for this is so that the GLXContext that is created will be properly
added to the context list so it can be used for other purposes.  This should
reduce the number of GL contexts by one for all d3d and (behaved) opengl apps.

I'm currently in the process of cleaning everything up and then I will post a
patch on my site for people to download.  Due to the scope of the changes, I
really hope that people can help me test this sucker...  once that's done I'll
chop up the patch into logical pieces and submit them.

That's all for now!

- Aric

P.S. If anyone wants, they can edit http://winehq.org/site/fun_projects and put
me down for the "wined3d use wgl" project.




More information about the wine-devel mailing list