Ivan Gyurdiev : wined3d: Allow null streams in the vertex declaration.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Sep 25 09:46:53 CDT 2006


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

Author: Ivan Gyurdiev <ivg231 at gmail.com>
Date:   Sun Sep 17 16:26:18 2006 -0400

wined3d: Allow null streams in the vertex declaration.

---

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

diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 9078aee..2c31eb9 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -441,7 +441,12 @@ void primitiveDeclarationConvertToStride
         unsigned int idx;
 
         element = vertexDeclaration->pDeclarationWine + i;
-        TRACE("%p Elements %p %d or %d\n", vertexDeclaration->pDeclarationWine, element,  i, vertexDeclaration->declarationWNumElements);
+        TRACE("%p Element %p (%d of %d)\n", vertexDeclaration->pDeclarationWine,
+            element,  i + 1, vertexDeclaration->declarationWNumElements - 1);
+
+        if (This->stateBlock->streamSource[element->Stream] == NULL)
+            continue;
+
         if (This->stateBlock->streamIsUP) {
             TRACE("Stream is up %d, %p\n", element->Stream, This->stateBlock->streamSource[element->Stream]);
             streamVBO = 0;




More information about the wine-cvs mailing list