d3dx9: Implement D3DXCreateCubeTexture.

This commit is contained in:
Matteo Bruni 2010-10-18 18:37:14 +02:00 committed by Alexandre Julliard
parent 6933766531
commit 390ba2c338
2 changed files with 28 additions and 1 deletions

View File

@ -34,7 +34,7 @@
@ stdcall D3DXCreateBox(ptr float float float ptr ptr)
@ stdcall D3DXCreateBuffer(long ptr)
@ stub D3DXCreateCompressedAnimationSet
@ stub D3DXCreateCubeTexture
@ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr)
@ stub D3DXCreateCubeTextureFromFileA
@ stub D3DXCreateCubeTextureFromFileExA
@ stub D3DXCreateCubeTextureFromFileExW

View File

@ -804,3 +804,30 @@ HRESULT WINAPI D3DXCreateTextureFromResourceExW(LPDIRECT3DDEVICE9 device,
return D3DXERR_INVALIDDATA;
}
HRESULT WINAPI D3DXCreateCubeTexture(LPDIRECT3DDEVICE9 device,
UINT size,
UINT miplevels,
DWORD usage,
D3DFORMAT format,
D3DPOOL pool,
LPDIRECT3DCUBETEXTURE9 *texture)
{
HRESULT hr;
TRACE("(%p, %u, %u, %#x, %#x, %#x, %p)\n", device, size, miplevels, usage, format,
pool, texture);
if (!device || !texture)
return D3DERR_INVALIDCALL;
hr = D3DXCheckCubeTextureRequirements(device, &size, &miplevels, usage, &format, pool);
if (FAILED(hr))
{
TRACE("D3DXCheckCubeTextureRequirements failed\n");
return hr;
}
return IDirect3DDevice9_CreateCubeTexture(device, size, miplevels, usage, format, pool, texture, NULL);
}