=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: ddraw: Pass the number of vertices to DrawIndexedPrimitive.
Alexandre Julliard
julliard at winehq.org
Tue Dec 18 13:49:05 CST 2012
Module: wine
Branch: master
Commit: ea40a3a8b558dc99d589b9e3b11006fa00ade2d6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ea40a3a8b558dc99d589b9e3b11006fa00ade2d6
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Tue Dec 18 10:44:57 2012 +0100
ddraw: Pass the number of vertices to DrawIndexedPrimitive.
---
dlls/ddraw/ddraw_private.h | 3 ++-
dlls/ddraw/executebuffer.c | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
index 85f6ca3..a0d7a4f 100644
--- a/dlls/ddraw/ddraw_private.h
+++ b/dlls/ddraw/ddraw_private.h
@@ -494,7 +494,8 @@ struct d3d_execute_buffer
/* This buffer will store the transformed vertices */
void *vertex_data;
WORD *indices;
- int nb_indices;
+ unsigned int nb_indices;
+ unsigned int nb_vertices;
/* This flags is set to TRUE if we allocated ourselves the
* data buffer
diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c
index 85625c1..f09460f 100644
--- a/dlls/ddraw/executebuffer.c
+++ b/dlls/ddraw/executebuffer.c
@@ -133,7 +133,8 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
instr += size;
}
IDirect3DDevice7_DrawIndexedPrimitive(&device->IDirect3DDevice7_iface,
- D3DPT_TRIANGLELIST, D3DFVF_TLVERTEX, tl_vx, 0, buffer->indices, count * 3, 0);
+ D3DPT_TRIANGLELIST, D3DFVF_TLVERTEX, tl_vx, buffer->nb_vertices,
+ buffer->indices, count * 3, 0);
} break;
case D3DOP_MATRIXLOAD:
@@ -711,6 +712,7 @@ static HRESULT WINAPI d3d_execute_buffer_SetExecuteData(IDirect3DExecuteBuffer *
/* Prepares the transformed vertex buffer */
HeapFree(GetProcessHeap(), 0, buffer->vertex_data);
buffer->vertex_data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nbvert * sizeof(D3DTLVERTEX));
+ buffer->nb_vertices = nbvert;
if (TRACE_ON(ddraw))
_dump_executedata(data);
More information about the wine-cvs
mailing list