Sorry for reposting - apparently my original nabble link did not work :(
---
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/n2805603/patch patch
Thx
Misha
--
View this message in context: http://wine.1045685.n5.nabble.com/Must-copy-static-const-D3DVERTEXELEMENT9-into-dynamically-alllocated-D3DVERTEXELEMENT9-before-pointe-tp2805603p2805603.html
Sent from the Wine - Devel mailing list archive at Nabble.com.