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.
This commit is contained in:
Roderick Colenbrander 2006-03-12 16:27:31 +01:00 committed by Alexandre Julliard
parent 93676b10c6
commit d4836e1ce1
1 changed files with 5 additions and 0 deletions

View File

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