Stefan Dösinger : wined3d: Index buffer data is unsigned.

Alexandre Julliard julliard at wine.codeweavers.com
Sat Apr 7 05:23:19 CDT 2007


Module: wine
Branch: master
Commit: a9e04dd87fdf95d92f671a0728208b88bfe8167e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a9e04dd87fdf95d92f671a0728208b88bfe8167e

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Fri Apr  6 14:22:14 2007 +0200

wined3d: Index buffer data is unsigned.

---

 dlls/wined3d/drawprim.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 089030b..9820158 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -449,8 +449,8 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
 
     unsigned int               textureNo    = 0;
     unsigned int               texture_idx  = 0;
-    const short               *pIdxBufS     = NULL;
-    const long                *pIdxBufL     = NULL;
+    const WORD                *pIdxBufS     = NULL;
+    const DWORD               *pIdxBufL     = NULL;
     LONG                       vx_index;
     float x  = 0.0f, y  = 0.0f, z = 0.0f;  /* x,y,z coordinates          */
     float rhw = 0.0f;                      /* rhw                        */
@@ -458,7 +458,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
     DWORD specularColor = 0;               /* Specular Color             */
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
     UINT *streamOffset = This->stateBlock->streamOffset;
-    LONG                       SkipnStrides = startVertex + This->stateBlock->loadBaseVertexIndex;
+    DWORD                      SkipnStrides = startVertex + This->stateBlock->loadBaseVertexIndex;
 
     BYTE *texCoords[WINED3DDP_MAXTEXCOORD];
     BYTE *diffuse = NULL, *specular = NULL, *normal = NULL, *position = NULL;
@@ -475,8 +475,8 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
             idxData = ((IWineD3DIndexBufferImpl *) This->stateBlock->pIndexData)->resource.allocatedMemory;
         }
 
-        if (idxSize == 2) pIdxBufS = (const short *) idxData;
-        else pIdxBufL = (const long *) idxData;
+        if (idxSize == 2) pIdxBufS = (const WORD *) idxData;
+        else pIdxBufL = (const DWORD *) idxData;
     }
 
     /* Adding the stream offset once is cheaper than doing it every iteration. Do not modify the strided data, it is a pointer




More information about the wine-cvs mailing list