d3d9: Store the FVF in the d3d9 vertex buffer.

This commit is contained in:
Stefan Dösinger 2009-04-09 10:48:42 +02:00 committed by Alexandre Julliard
parent ff16f30677
commit 77e6dcca02
2 changed files with 4 additions and 1 deletions

View File

@ -329,6 +329,8 @@ typedef struct IDirect3DVertexBuffer9Impl
/* Parent reference */
LPDIRECT3DDEVICE9EX parentDevice;
DWORD fvf;
} IDirect3DVertexBuffer9Impl;
/* --------------------- */

View File

@ -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);