Hello

Thank you for the feedback, Rico.

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.


The side effect is to show there is a bug in our built-in GenerateAdjacency


Nozomi



________________________________
 De : Rico Schüller <kgbric...@web.de>
À : Nozomi Kodama <nozomi.kod...@yahoo.com> 
Cc : wine-devel@winehq.org 
Envoyé le : Vendredi 21 juin 2013 23h24
Objet : Re: d3dx9: Implement adjacency in D3DXCreateSphere
 

On 20.06.2013 21:25, Nozomi Kodama wrote:
> +    if (adjacency)
> +    {
> +        DWORD *buffer, size;
> +        ID3DXBuffer *temp;
> +
> +        size = 3 * sphere->lpVtbl->GetNumFaces(sphere) * sizeof(DWORD);
> +        hr = D3DXCreateBuffer(size, &temp);
> +        if (hr != D3D_OK)
> +            return hr;
> +
> +        buffer = (DWORD *)(ID3DXBuffer_GetBufferPointer(temp));
Are the outer parentheses needed? Is the cast needed?

> +        hr = sphere->lpVtbl->GenerateAdjacency(sphere, -0.000001f, buffer);
> +        if (hr != D3D_OK)
> +            return hr;
This may leak the temp ID3DXBuffer in the error case.

Cheers
Rico


Reply via email to