When compiling d3d8 and wined3d I get quite a few warnings about missing function prototypes. Eg, "warning: implicit declaration of function `glMultiTexCoord1f'" etc. This in turn causes things like texture coordinates to be all messed up (screenshot attached). I'm using the nVidia OpenGL headers.
In the case of wined3d it seems to be caused by GL_GLEXT_PROTOTYPES being defined to late.
In include/wine/wined3d_gl.h: #define XMD_H /* This is to prevent the Xmd.h inclusion bug :-/ */ #include <GL/gl.h> #define GL_GLEXT_PROTOTYPES #define GLX_GLXEXT_PROTOTYPES #include <GL/glx.h> #ifdef HAVE_GL_GLEXT_H # include <GL/glext.h> #endif #undef XMD_H
Seems ok, but gl.h actually includes glext.h: #ifndef GL_GLEXT_LEGACY #include <GL/glext.h> #endif
Moving the #define GL_GLEXT_PROTOTYPES up to before the #include <GL/gl.h> fixes it. Pretty much the same goes for d3d8, except that for d3d8 GL_GLEXT_PROTOTYPES doesn't appear to be defined at all.
In both include/wine/wined3d_gl.h and dlls/d3d8/d3d8_private.h the relevant section should then become: #define XMD_H /* This is to prevent the Xmd.h inclusion bug :-/ */ #define GL_GLEXT_PROTOTYPES #include <GL/gl.h> #define GLX_GLXEXT_PROTOTYPES #include <GL/glx.h> #ifdef HAVE_GL_GLEXT_H # include <GL/glext.h> #endif #undef XMD_H