On Wednesday 14 December 2005 04:53, Aric Cyr wrote:
Hello all,
Hi,
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:
- 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
- what is the reason for wglGetProcAddress to check opengl32.dll before libGL.so? Would the reverse logic still be a resonable solution?
No
Regards, Aric
Regards, Raphael