- currently always use sloaw path as fast path have some problems
- fix APIENTRY mismatched value used by gl func pointers (in
  d3dcore_gl.h)

diff --git a/dlls/d3d8/d3d8_main.c b/dlls/d3d8/d3d8_main.c
index 6803c07..704cf06 100644
--- a/dlls/d3d8/d3d8_main.c
+++ b/dlls/d3d8/d3d8_main.c
@@ -29,6 +29,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(d3d);
 
+int num_lock = 0;
 void (*wine_tsx11_lock_ptr)(void) = NULL;
 void (*wine_tsx11_unlock_ptr)(void) = NULL;
 
diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h
index 65bd4c8..d70d265 100644
--- a/dlls/d3d8/d3d8_private.h
+++ b/dlls/d3d8/d3d8_private.h
@@ -18,8 +18,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#ifndef __WINE_D3DX8_PRIVATE_H
-#define __WINE_D3DX8_PRIVATE_H
+#ifndef __WINE_D3D8_PRIVATE_H
+#define __WINE_D3D8_PRIVATE_H
 
 #ifndef __WINE_CONFIG_H
 # error You must include config.h to use this header
@@ -49,8 +49,14 @@
 extern void (*wine_tsx11_unlock_ptr)(void);
 
 /* As GLX relies on X, this is needed */
+extern int num_lock;
+#if 0
+#define ENTER_GL() ++num_lock; TRACE("inc lock to: %d\n", num_lock); wine_tsx11_lock_ptr()
+#define LEAVE_GL() if (num_lock > 2) TRACE("fucking locks: %d\n", num_lock); --num_lock; wine_tsx11_unlock_ptr()
+#else
 #define ENTER_GL() wine_tsx11_lock_ptr()
 #define LEAVE_GL() wine_tsx11_unlock_ptr()
+#endif
 
 #include "d3d8.h"
 
@@ -185,31 +191,6 @@
 
 #include "d3dcore_gl.h"
 
-#define USE_GL_FUNC(type, pfn) type pfn;
-typedef struct _GL_Info {
-  /** 
-   * CAPS Constants 
-   */
-  UINT   max_lights;
-  UINT   max_textures;
-  UINT   max_clipplanes;
-
-  GL_PSVersion ps_arb_version;
-  GL_PSVersion ps_nv_version;
-
-  GL_VSVersion vs_arb_version;
-  GL_VSVersion vs_nv_version;
-  GL_VSVersion vs_ati_version;
-  
-  BOOL supported[30];
-
-  /** OpenGL EXT and ARB functions ptr */
-  GL_EXT_FUNCS_GEN;
-  /** OpenGL GLX functions ptr */
-  GLX_EXT_FUNCS_GEN;
-  /**/
-} GL_Info;
-#undef USE_GL_FUNC
 
 #define GL_LIMITS(ExtName)            (This->direct3d8->gl_info.max_##ExtName)
 #define GL_SUPPORT(ExtName)           (TRUE == This->direct3d8->gl_info.supported[ExtName])
@@ -252,7 +233,6 @@
  * Predeclare the interface implementation structures
  */
 extern ICOM_VTABLE(IDirect3D8) Direct3D8_Vtbl;
-extern ICOM_VTABLE(IDirect3D8) mesa_d3d8vt;
 
 /*****************************************************************************
  * IDirect3D implementation structure
diff --git a/dlls/d3d8/d3dcore_gl.h b/dlls/d3d8/d3dcore_gl.h
index 042b750..22b610b 100644
--- a/dlls/d3d8/d3dcore_gl.h
+++ b/dlls/d3d8/d3dcore_gl.h
@@ -33,8 +33,10 @@
 #endif
 #undef  XMD_H
 
+#undef  APIENTRY
+#define APIENTRY
 
-/*******
+/**********************************
  * OpenGL Extensions (EXT and ARB)
  *  defines and functions pointer
  */
@@ -143,14 +145,14 @@
 #endif
 
 
-/*******
+/*********************************
  * OpenGL GLX Extensions
  *  defines and functions pointer
  */
 
 
 
-/*******
+/*********************************
  * OpenGL GLX Official Version
  *  defines and functions pointer
  */
@@ -176,7 +178,7 @@
 typedef void          (APIENTRY * PGLXFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
 
 
-/*******
+/********************************************
  * OpenGL Supported Extensions (ARB and EXT)
  */
 
@@ -280,11 +282,10 @@
                     const void *idxData,
                     int   minIndex);
 
-/* Structures required to draw primitives */
 
-
-
-
+/*****************************************
+ * Structures required to draw primitives 
+ */
 
 typedef struct Direct3DStridedData {
     BYTE     *lpData;        /* Pointer to start of data               */
@@ -308,4 +309,31 @@
     } DUMMYUNIONNAME;
 } Direct3DVertexStridedData;
 
+#define USE_GL_FUNC(type, pfn) type pfn;
+typedef struct _GL_Info {
+  /** 
+   * CAPS Constants 
+   */
+  UINT   max_lights;
+  UINT   max_textures;
+  UINT   max_clipplanes;
+
+  GL_PSVersion ps_arb_version;
+  GL_PSVersion ps_nv_version;
+
+  GL_VSVersion vs_arb_version;
+  GL_VSVersion vs_nv_version;
+  GL_VSVersion vs_ati_version;
+  
+  BOOL supported[30];
+
+  /** OpenGL EXT and ARB functions ptr */
+  GL_EXT_FUNCS_GEN;
+  /** OpenGL GLX functions ptr */
+  GLX_EXT_FUNCS_GEN;
+  /**/
+} GL_Info;
+#undef USE_GL_FUNC
+
+
 #endif  /* __WINE_D3DCORE_GL_H */
diff --git a/dlls/d3d8/drawprim.c b/dlls/d3d8/drawprim.c
index 96f26ed..155a276 100644
--- a/dlls/d3d8/drawprim.c
+++ b/dlls/d3d8/drawprim.c
@@ -1295,7 +1295,7 @@
         drawStridedSoftwareVS(iface, &dataLocations, PrimitiveType, NumPrimitives, 
                         idxData, idxSize, minIndex, StartIdx);            
 
-    } else if (/*TRUE ||*/
+    } else if (TRUE ||
 	       (dataLocations.u.s.pSize.lpData        != NULL) || 
                (dataLocations.u.s.diffuse.lpData      != NULL) || 
                (dataLocations.u.s.blendWeights.lpData != NULL)) {