[wined3d] Converting Wined3d to use WGL instead of GLX

Raphael fenix at club-internet.fr
Wed Dec 14 02:07:37 CST 2005

On Wednesday 14 December 2005 04:53, Aric Cyr wrote:
> Hello all,

> As I mentinoed in a recent post, I have almost completed the GLX->WGL
> conversion.  Last night I tracked down my last bug that was causing most of
> my demo apps to fail.
> It seems that the problem was the conversion from glXGetProcAddress to
> using wglGetProcAddress.  wined3d uses glXGetProcAddress to get the OpenGL
> extension function pointers, which is what wglGetProcAddress also does. 
> However wglGetProcAddress _first_ checks opengl32.dll for the extension and
> returns the thunk function pointer if it exists, and only then falls back
> to libGL.so by calling glXGetProcAddress.

> So now I am stuck...  if I use wglGetProcAddress for OpenGL extensions I
> get crashes in most D3D9 applications.  If I use glXGetProcAddress in
> wined3d everything works fine, but then wined3d is still dependent on glx.
> So my questions:
> 1) should the thunks returned from wglGetProcAddress be causing crashes at
> all? Note that they don't crash right away, but "eventually" usually during
> a call to glDrawArrays it seems (after a call to glSecondaryColor3fEXT).

The real problem here is "why it crash ?"
It shouldn't as wine gl* calls are only "decorators" calls
Maybe we have a declaration error...

Can you provide more informations:
- WINEDEBUG=+opengl log + winedbg crash log

> 2) what is the reason for wglGetProcAddress to check opengl32.dll before
>    libGL.so? Would the reverse logic still be a resonable solution?


> Regards,
>   Aric

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20051214/5727ae89/attachment.pgp

More information about the wine-devel mailing list