wgl prototypes missing from wingdi.h

Lionel Ulmer lionel.ulmer at free.fr
Thu Jul 15 07:32:51 CDT 2004


On Thu, Jul 15, 2004 at 09:29:34AM +0200, Andreas Mohr wrote:
> ...which could perhaps be solved by making the calling convention a define
> in the Linux headers, no?
> 
> /* our headers usually need cdecl, but external software sometimes has different requirements, so allow overriding */
> #ifndef WGL_CALLCONV
> #define WGL_CALLCONV cdecl
> #endif
> 
> And Wine then simply does:
> #define WGL_CALLCONV stdcall
> #include "opengl_header.h"
> 
> Or am I completely and utterly mistaken here?

No, but the problem is that do not have any control on the GL headers (you
have some shipped by Mesa, some by NVIDIA, some by SGI, you may even have
one shipped by Sun or Apple if you compile a Winelib application there).

Note that what you propose is actually already doable on the headers I have
on my box (no idea where they come from, must be a mix between Mesa, NVIDIA
and SGI :-) ) as all API functions are prefixed by a 'GLAPI' define which is
defined as '__stdcall' if '_WIN32' is defined (we are lucky that Wine does
not define _WIN32 in any of its header files :-) ).

             Lionel

-- 
		 Lionel Ulmer - http://www.bbrox.org/



More information about the wine-devel mailing list