From d4836e1ce1a8c831d76eef2ee8c712539983c763 Mon Sep 17 00:00:00 2001 From: Roderick Colenbrander Date: Sun, 12 Mar 2006 16:27:31 +0100 Subject: [PATCH] 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 file changed, 5 insertions(+) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 7ce1d5937e5..eab7fbfa018 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4046,6 +4046,11 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShader(IWineD3DDevice *iface, IWineD3 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