From 77e6dcca02080c065fa1d68d2cf6077b882e0cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Thu, 9 Apr 2009 10:48:42 +0200 Subject: [PATCH] d3d9: Store the FVF in the d3d9 vertex buffer. --- dlls/d3d9/d3d9_private.h | 2 ++ dlls/d3d9/vertexbuffer.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h index 8436b1dd87b..9338f976318 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -329,6 +329,8 @@ typedef struct IDirect3DVertexBuffer9Impl /* Parent reference */ LPDIRECT3DDEVICE9EX parentDevice; + + DWORD fvf; } IDirect3DVertexBuffer9Impl; /* --------------------- */ diff --git a/dlls/d3d9/vertexbuffer.c b/dlls/d3d9/vertexbuffer.c index 63cac926e72..d13ebef8d45 100644 --- a/dlls/d3d9/vertexbuffer.c +++ b/dlls/d3d9/vertexbuffer.c @@ -197,8 +197,8 @@ static HRESULT WINAPI IDirect3DVertexBuffer9Impl_GetDesc(LPDIRECT3DVERTEXBUFFER9 pDesc->Usage = desc.Usage; pDesc->Pool = desc.Pool; pDesc->Size = desc.Size; - pDesc->FVF = desc.FVF; pDesc->Type = D3DRTYPE_VERTEXBUFFER; + pDesc->FVF = This->fvf; } @@ -245,6 +245,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexBuffer(LPDIRECT3DDEVICE9EX iface object->lpVtbl = &Direct3DVertexBuffer9_Vtbl; object->ref = 1; + object->fvf = FVF; EnterCriticalSection(&d3d9_cs); hrc = IWineD3DDevice_CreateVertexBuffer(This->WineD3DDevice, Size, Usage & WINED3DUSAGE_MASK, FVF, (WINED3DPOOL) Pool, &(object->wineD3DVertexBuffer), pSharedHandle, (IUnknown *)object); LeaveCriticalSection(&d3d9_cs);