On Thu, May 10, 2012 at 4:28 PM, Matteo Bruni <matteo.mystral(a)gmail.com> wrote:
2012/5/9 Józef Kucia <joseph.kucia(a)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.