Re: [4/5] d3dx9: Implement D3DXCreateTexture plus tests
On 21 July 2010 16:06, Owen Rudge <owen(a)owenrudge.net> wrote:
+ hr = D3DXCreateTexture(device, D3DX_DEFAULT, 63, 0, 0, 0, D3DPOOL_DEFAULT, &texture); + ok(hr == D3D_OK, "D3DXCreateTexture returned %#x, expected %#x\n", hr, D3D_OK); + + if (texture) + { + hr = IDirect3DTexture9_GetLevelDesc(texture, 0, &desc); + + ok(desc.Width == 63, "Returned width %d, expected %d\n", desc.Width, 63); + ok(desc.Height == 63, "Returned height %d, expected %d\n", desc.Height, 63); + + IDirect3DTexture9_Release(texture); + } I (still) think that depends on NPOT texture support in the device. I.e., if the device doesn't support NPOT textures, I suppose the call can either fail, or create a texture with different dimension like 64x64, but it can't create 63x63 textures. Note that D3DPTEXTURECAPS_NONPOW2CONDITIONAL also affects NPOT capabilities.
participants (1)
-
Henri Verbeet