Stefan Dösinger : d3d8: Store the fvf in the d3d8 vertex buffer.

Alexandre Julliard julliard at winehq.org
Thu Apr 9 11:13:51 CDT 2009


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

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Mon Apr  6 14:10:29 2009 +0200

d3d8: Store the fvf in the d3d8 vertex buffer.

---

 dlls/d3d8/d3d8_private.h |    2 ++
 dlls/d3d8/device.c       |    1 +
 dlls/d3d8/vertexbuffer.c |    2 +-
 3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h
index 1464588..01a475e 100644
--- a/dlls/d3d8/d3d8_private.h
+++ b/dlls/d3d8/d3d8_private.h
@@ -326,6 +326,8 @@ struct IDirect3DVertexBuffer8Impl
 
     /* Parent reference */
     LPDIRECT3DDEVICE8                 parentDevice;
+
+    DWORD                             fvf;
 };
 
 /* --------------------- */
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 42c6c81..352018f 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -739,6 +739,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateVertexBuffer(LPDIRECT3DDEVICE8
     EnterCriticalSection(&d3d8_cs);
     hrc = IWineD3DDevice_CreateVertexBuffer(This->WineD3DDevice, Size, Usage & WINED3DUSAGE_MASK, FVF, (WINED3DPOOL) Pool, &(object->wineD3DVertexBuffer), NULL, (IUnknown *)object);
     LeaveCriticalSection(&d3d8_cs);
+    object->fvf = FVF;
 
     if (D3D_OK != hrc) {
 
diff --git a/dlls/d3d8/vertexbuffer.c b/dlls/d3d8/vertexbuffer.c
index bcbb47f..569efa2 100644
--- a/dlls/d3d8/vertexbuffer.c
+++ b/dlls/d3d8/vertexbuffer.c
@@ -194,7 +194,7 @@ static HRESULT WINAPI IDirect3DVertexBuffer8Impl_GetDesc(LPDIRECT3DVERTEXBUFFER8
         pDesc->Usage = desc.Usage;
         pDesc->Pool = desc.Pool;
         pDesc->Size = desc.Size;
-        pDesc->FVF = desc.FVF;
+        pDesc->FVF = This->fvf;
         pDesc->Format = d3dformat_from_wined3dformat(desc.Format);
     }
 




More information about the wine-cvs mailing list