<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt">Hello<br><br>Thank you for the feedback, Rico.<br><br>But, there is a problem with this patch.  Native d3dx9 does not call GenerateAdjacency. It hardcodes the adjacency. That is proved by the case D3DXCreateSpehere(device, 0.0f, 10,10,adjacency) where native gives different result using GenerateAdjacency or not. I need thinking more how to hardcode adjacency.<br><div><span><br></span></div><div>The side effect is to show there is a bug in our built-in GenerateAdjacency</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">Nozomi<br></div><div
 style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font face="Arial" size="2"> <b><span style="font-weight:bold;">De :</span></b> Rico Sch�ller <kgbricola@web.de><br> <b><span style="font-weight: bold;">� :</span></b> Nozomi Kodama <nozomi.kodama@yahoo.com> <br><b><span style="font-weight: bold;">Cc :</span></b> wine-devel@winehq.org <br> <b><span style="font-weight: bold;">Envoy� le :</span></b> Vendredi 21 juin 2013 23h24<br> <b><span style="font-weight: bold;">Objet :</span></b> Re: d3dx9: Implement adjacency in D3DXCreateSphere<br> </font> </div> <div class="y_msg_container"><br>On 20.06.2013 21:25, Nozomi
 Kodama wrote:<br>> +    if (adjacency)<br>> +    {<br>> +        DWORD *buffer, size;<br>> +        ID3DXBuffer *temp;<br>> +<br>> +        size = 3 * sphere->lpVtbl->GetNumFaces(sphere) * sizeof(DWORD);<br>> +        hr = D3DXCreateBuffer(size, &temp);<br>> +        if (hr != D3D_OK)<br>> +            return hr;<br>> +<br>> +        buffer = (DWORD *)(ID3DXBuffer_GetBufferPointer(temp));<br>Are the outer parentheses needed? Is the cast needed?<br><br>> +        hr = sphere->lpVtbl->GenerateAdjacency(sphere, -0.000001f, buffer);<br>> +        if (hr != D3D_OK)<br>> +            return hr;<br>This may leak the temp ID3DXBuffer in the error
 case.<br><br>Cheers<br>Rico<br><br><br></div> </div> </div>  </div></body></html>