[3/3] d3dx9: Implement D3DXCreateVolumeTexture.
Matteo Bruni
matteo.mystral at gmail.com
Tue Nov 9 08:54:20 CST 2010
-------------- next part --------------
From f7c333932f758d8dfdd2362c18da865bf4777787 Mon Sep 17 00:00:00 2001
From: Matteo Bruni <mbruni at codeweavers.com>
Date: Mon, 8 Nov 2010 23:00:45 +0100
Subject: d3dx9: Implement D3DXCreateVolumeTexture.
---
dlls/d3dx9_36/d3dx9_36.spec | 2 +-
dlls/d3dx9_36/texture.c | 31 +++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 1 deletions(-)
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec
index c20e2f9..efe28c5 100644
--- a/dlls/d3dx9_36/d3dx9_36.spec
+++ b/dlls/d3dx9_36/d3dx9_36.spec
@@ -106,7 +106,7 @@
@ stub D3DXCreateTextureGutterHelper
@ stub D3DXCreateTextureShader
@ stub D3DXCreateTorus
-@ stub D3DXCreateVolumeTexture
+@ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr)
@ stub D3DXCreateVolumeTextureFromFileA
@ stub D3DXCreateVolumeTextureFromFileExA
@ stub D3DXCreateVolumeTextureFromFileExW
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
index b191a34..04422e5 100644
--- a/dlls/d3dx9_36/texture.c
+++ b/dlls/d3dx9_36/texture.c
@@ -905,3 +905,34 @@ HRESULT WINAPI D3DXCreateCubeTexture(LPDIRECT3DDEVICE9 device,
return IDirect3DDevice9_CreateCubeTexture(device, size, miplevels, usage, format, pool, texture, NULL);
}
+
+HRESULT WINAPI D3DXCreateVolumeTexture(LPDIRECT3DDEVICE9 device,
+ UINT width,
+ UINT height,
+ UINT depth,
+ UINT miplevels,
+ DWORD usage,
+ D3DFORMAT format,
+ D3DPOOL pool,
+ LPDIRECT3DVOLUMETEXTURE9 *texture)
+{
+ HRESULT hr;
+
+ TRACE("(%p, %u, %u, %u, %u, %#x, %#x, %#x, %p)\n", device, width, height, depth,
+ miplevels, usage, format, pool, texture);
+
+ if (!device || !texture)
+ return D3DERR_INVALIDCALL;
+
+ hr = D3DXCheckVolumeTextureRequirements(device, &width, &height, &depth,
+ &miplevels, usage, &format, pool);
+
+ if (FAILED(hr))
+ {
+ TRACE("D3DXCheckVolumeTextureRequirements failed\n");
+ return hr;
+ }
+
+ return IDirect3DDevice9_CreateVolumeTexture(device, width, height, depth, miplevels,
+ usage, format, pool, texture, NULL);
+}
--
1.7.2.2
More information about the wine-patches
mailing list