Dear All:
Sorry to bother... I am working on a D3DXCreateMesh/ID3DXMesh patch, and I encountered a very strange error.
Specifically, it seems that when passing a LPD3DVERTEXELEMENT9 * parameter to D3DXCreateMesh, a) in Windows - one can create
static const D3DVERTEXELEMENT9 decl1[3] = { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, 0xC, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0}, D3DDECL_END(), };
and pass (LPD3DVERTEXELEMENT9 *)&decl1 directly.
b) in Wine tests - I must first allocate a D3DVERTELEMENT9 *, then call HeapAlloc, and finally copy my original decl1 and pass &decl (pointer to newly allocated structure) for it to work. Any ideas?
Here is my git diff http://wine.1045685.n5.nabble.com/file/n2805542/patch patch
Thx Misha
Take a good look at the function's prototype.