<div class="gmail_quote">2010/9/7 misha680 <span dir="ltr">&lt;<a href="mailto:misha680@gmail.com" target="_blank">misha680@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
Sorry for reposting - apparently my original nabble link did not work :(<br>
<br>
---<br>
<div><br>
Dear All:<br>
<br>
Sorry to bother... I am working on a D3DXCreateMesh/ID3DXMesh patch, and I<br>
encountered a very strange error.<br>
<br>
Specifically, it seems that when passing a LPD3DVERTEXELEMENT9 * parameter<br>
to D3DXCreateMesh,<br>
a) in Windows - one can create<br>
<br>
 � �static const D3DVERTEXELEMENT9 decl1[3] = {<br>
 � � � �{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT,<br>
D3DDECLUSAGE_POSITION, 0},<br>
 � � � �{0, 0xC, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT,<br>
D3DDECLUSAGE_NORMAL, 0},<br>
 � � � �D3DDECL_END(), };<br>
<br>
and pass (LPD3DVERTEXELEMENT9 *)&amp;decl1 directly.<br>
<br>
b) in Wine tests - I must first allocate a D3DVERTELEMENT9 *, then call<br>
HeapAlloc, and finally copy my original decl1 and pass &amp;decl (pointer to<br>
newly allocated structure) for it to work. Any ideas?<br>
<br>
Here is my git diff<br>
</div><a href="http://wine.1045685.n5.nabble.com/file/n2805603/patch" target="_blank">http://wine.1045685.n5.nabble.com/file/n2805603/patch</a> patch<br>
<br>
Thx<br>
Misha<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://wine.1045685.n5.nabble.com/Must-copy-static-const-D3DVERTEXELEMENT9-into-dynamically-alllocated-D3DVERTEXELEMENT9-before-pointe-tp2805603p2805603.html" target="_blank">http://wine.1045685.n5.nabble.com/Must-copy-static-const-D3DVERTEXELEMENT9-into-dynamically-alllocated-D3DVERTEXELEMENT9-before-pointe-tp2805603p2805603.html</a><br>


</font><div><div></div><div>Sent from the Wine - Devel mailing list archive at Nabble.com.<br>
<br>
<br>
</div></div></blockquote></div>Hi Misha,<br><br>It&#39;s currently a stub in wine [1] and tests are using a static const D3DVERTEXELEMENT9 array as parameter [2] so it should be because of your modified D3DXCreateMesh implementation which isn&#39;t visible in your patch.<br clear="all">

<br>[1] <a href="http://source.winehq.org/git/wine.git/?a=blob;f=dlls/d3dx9_36/mesh.c#l586" target="_blank">http://source.winehq.org/git/wine.git/?a=blob;f=dlls/d3dx9_36/mesh.c#l586</a><br>[2] <a href="http://source.winehq.org/git/wine.git/?a=blob;f=dlls/d3dx9_36/tests/mesh.c#l988" target="_blank">http://source.winehq.org/git/wine.git/?a=blob;f=dlls/d3dx9_36/tests/mesh.c#l988</a><br>

<br>-- <br>Nicolas Le Cam<br>