[4/8] d3dx9: Implement D3DXCreateCubeTextureFromFileInMemoryEx.

Józef Kucia joseph.kucia at gmail.com
Thu May 10 10:46:26 CDT 2012


On Thu, May 10, 2012 at 4:28 PM, Matteo Bruni <matteo.mystral at gmail.com> wrote:
> 2012/5/9 Józef Kucia <joseph.kucia at gmail.com>:
>> +    if ((caps.Caps2 & D3DCAPS2_DYNAMICTEXTURES) && (pool != D3DPOOL_DEFAULT) && (usage != D3DUSAGE_DYNAMIC))
>> +    {
>> +        hr = D3DXCreateCubeTexture(device, size, mip_levels, usage, format, pool, &tex);
>> +        buftex = NULL;
>> +    }
>> +    else
>> +    {
>> +        hr = D3DXCreateCubeTexture(device, size, mip_levels, usage, format, D3DPOOL_SYSTEMMEM, &buftex);
>> +        tex = buftex;
>> +    }
>
> The "if" condition doesn't look correct to me, since e.g. you don't
> need a temporary texture if pool == D3DPOOL_DEFAULT and usage ==
> D3DUSAGE_DYNAMIC.

Good catch. It was copied from D3DXCreateTextureFromFileInMemoryEx and
I didn't really check if it's correct.



More information about the wine-devel mailing list