Hi, > I don't understand what the code does but every part of it depends on > having a non-NULL SrcImpl. I think screaming bloody murder but continuing > is better than crashing. > > I agree that the code doesn't look good but at least testing can proceed > past this point. For some reason I didn't get that patch, but from consulting the msdn documentation for IDirect3DDevice9::ProcessVertices it looks like ProcessVertices is a bit wrong. It doesn't get a Vertex buffer as in argument, instead it gets a vertex declaration. Furthermore our processvertices implementation doesn't handle vertex shaders.
The msdn page doesn't state explicitly, but I think if the vertex declaration is NULL either the current declaration in the device should be used, or D3DERR_INVALIDCALL returned. This should preferably be tested with a unit test. I was the one who implemented ProcessVertices, but I only implemented it for Direct3D7 applications, and it is only tested with Half-Life 1 and Anarchy Online. It should work for d3d8 and d3d9 apps with the fixed function pipeline, but not with shaders.
pgpVeYAx7qgXK.pgp
Description: PGP signature