Module: wine Branch: refs/heads/master Commit: d4836e1ce1a8c831d76eef2ee8c712539983c763 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=d4836e1ce1a8c831d76eef2e...
Author: Roderick Colenbrander thunderbird2k@gmx.net Date: Sun Mar 12 16:27:31 2006 +0100
wined3d: Vertexdeclaration fix.
In the old d3d8 code SetVertexShader stored the so called vertex declaration in the stateblock. In case of WineD3D this isn't done which breaks the drawPrimitive code. This patch stores the vertex declaration again in the stateblock which fixes Age Of Mythology.
---
dlls/wined3d/device.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 7ce1d59..eab7fbf 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4046,6 +4046,11 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetVer IWineD3DVertexShader_Release(oldShader); }
+ if (pShader != NULL && ((IWineD3DVertexShaderImpl *)pShader)->vertexDeclaration != NULL) { + TRACE("(%p) : setting vertexDeclaration(%p)\n", This, ((IWineD3DVertexShaderImpl *)pShader)->vertexDeclaration); + IWineD3DDevice_SetVertexDeclaration(iface, ((IWineD3DVertexShaderImpl *)pShader)->vertexDeclaration); + } + TRACE("(%p) : setting pShader(%p)\n", This, pShader); /** * TODO: merge HAL shaders context switching from prototype