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).

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



Reply via email to