Commit a9e04dd8 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Index buffer data is unsigned.

parent 0899d857
...@@ -449,8 +449,8 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData ...@@ -449,8 +449,8 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
unsigned int textureNo = 0; unsigned int textureNo = 0;
unsigned int texture_idx = 0; unsigned int texture_idx = 0;
const short *pIdxBufS = NULL; const WORD *pIdxBufS = NULL;
const long *pIdxBufL = NULL; const DWORD *pIdxBufL = NULL;
LONG vx_index; LONG vx_index;
float x = 0.0f, y = 0.0f, z = 0.0f; /* x,y,z coordinates */ float x = 0.0f, y = 0.0f, z = 0.0f; /* x,y,z coordinates */
float rhw = 0.0f; /* rhw */ float rhw = 0.0f; /* rhw */
...@@ -458,7 +458,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData ...@@ -458,7 +458,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
DWORD specularColor = 0; /* Specular Color */ DWORD specularColor = 0; /* Specular Color */
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
UINT *streamOffset = This->stateBlock->streamOffset; UINT *streamOffset = This->stateBlock->streamOffset;
LONG SkipnStrides = startVertex + This->stateBlock->loadBaseVertexIndex; DWORD SkipnStrides = startVertex + This->stateBlock->loadBaseVertexIndex;
BYTE *texCoords[WINED3DDP_MAXTEXCOORD]; BYTE *texCoords[WINED3DDP_MAXTEXCOORD];
BYTE *diffuse = NULL, *specular = NULL, *normal = NULL, *position = NULL; BYTE *diffuse = NULL, *specular = NULL, *normal = NULL, *position = NULL;
...@@ -475,8 +475,8 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData ...@@ -475,8 +475,8 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
idxData = ((IWineD3DIndexBufferImpl *) This->stateBlock->pIndexData)->resource.allocatedMemory; idxData = ((IWineD3DIndexBufferImpl *) This->stateBlock->pIndexData)->resource.allocatedMemory;
} }
if (idxSize == 2) pIdxBufS = (const short *) idxData; if (idxSize == 2) pIdxBufS = (const WORD *) idxData;
else pIdxBufL = (const long *) 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 /* Adding the stream offset once is cheaper than doing it every iteration. Do not modify the strided data, it is a pointer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment