Missing WGL function declarations in wingdi.h

Aric Cyr Aric.Cyr at gmail.com
Mon Nov 28 23:39:13 CST 2005

Lionel Ulmer <lionel.ulmer <at> free.fr> writes:

> > Anyone have problems with me
> > submitting a patch which would move the relevant (i.e. not all) parts of
> > dlls/opengl32/wgl.h into include/wingdi.h?
> Not from me. It simply that when I did the OpenGL work, 'winelib' was not
> really a priority and so I did not think about putting the 'wgl.h' headers
> somewhere usable for something else than the GL library itself.

Okay, I'm submit a patch for wgl headers then.  I should be able to just move
the relevant declarations from dlls/opengl32/wgl.h to include/wingdi.h without
any problems I think.  Please let me know if there are any gotchas I should
watch out for.

> Anyway, about your D3D over WGL project, I am still wondering how you are
> going to link 'wined3d' against OpenGL32.DLL. Direct linking or
> 'GetProcAddress' linking ? If it's the former, will you PE-link against
> OpenGL32.DLL or ELF-link against libGL.so ?
> Just wondering because if it's the former, you also need a complete set of
> 'GL' headers in Wine to have the stdcall version of all GL calls (and pay
> the price of thunking on each GL call).

Well I am only working on removing glX calls from wined3d and replacing them
with wgl calls so I'd rather not impact the GL code if possible.  At first I
didn't quite understand your question, so let me see if I got this right. 
Currently wined3d directly links to libGL.so (via EXTRALIBS in the Makefile). 
So if I wanted to use opengl32.dll (for wgl), and I added it to IMPORTS it would
override the libGL.so calls?

Currently that is what I am doing, but if that is causing all GL calls to go
through opengl32.dll then that is not good... Since there are not too many wgl
calls, it would probably be best to GetProcAddress them.  In fact, I am doing
this for a few wgl extensions anyways, so I might as well just do it for all of
wgl.  I'm not that familiar with the wine linking issues, so please let me know
if I am off here.


More information about the wine-devel mailing list