[PATCH 5/7] d3dx9: Implement D3DXCreateTexture.
Philip Nilsson
pnilsson at nullref.se
Fri Sep 19 10:45:21 CDT 2008
---
dlls/d3dx9_36/texture.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
index e34e511..799ddd8 100644
--- a/dlls/d3dx9_36/texture.c
+++ b/dlls/d3dx9_36/texture.c
@@ -191,9 +191,17 @@ HRESULT WINAPI D3DXCreateTexture(
{
HRESULT ret;
- FIXME("(%p, %u, %u, %u, %#x, %u, %#x, %p): semi-stub\n",
+ TRACE("(%p, %u, %u, %u, %#x, %u, %#x, %p)\n",
device, width, height, miplevels, usage, format, pool, texture);
+ if (!device || !texture)
+ return D3DERR_INVALIDCALL;
+
+ ret = D3DXCheckTextureRequirements(
+ device, &width, &height, &miplevels, usage, &format, pool);
+ if (ret != D3D_OK)
+ return ret;
+
ret = IDirect3DDevice9_CreateTexture(
device, width, height, miplevels, usage, format, pool, texture, NULL);
if (ret != D3D_OK)
--
1.6.0.2
More information about the wine-patches
mailing list