>From d0a2b14b33bb572c99005d8510ef0bd1b581d455 Mon Sep 17 00:00:00 2001 From: Misha Koshelev Date: Mon, 26 Jul 2010 17:43:48 -0500 Subject: d3dx9: Add stub and basic test for D3DXCreateMeshFVF. To: wine-patches Reply-To: wine-devel --- dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/mesh.c | 8 ++++++++ dlls/d3dx9_36/tests/mesh.c | 9 +++++++++ include/d3dx9mesh.h | 1 + 4 files changed, 19 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index 622a03c..ca925d9 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -72,7 +72,7 @@ @ stdcall D3DXCreateLine(ptr ptr) @ stdcall D3DXCreateMatrixStack(long ptr) @ stub D3DXCreateMesh -@ stub D3DXCreateMeshFVF +@ stdcall D3DXCreateMeshFVF(long long long long ptr ptr) @ stub D3DXCreateNPatchMesh @ stub D3DXCreatePMeshFromStream @ stub D3DXCreatePatchMesh diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index bfa1c23..5ff257c 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -328,6 +328,14 @@ BOOL WINAPI D3DXSphereBoundProbe(CONST D3DXVECTOR3 *pcenter, FLOAT radius, CONST return TRUE; } +HRESULT WINAPI D3DXCreateMeshFVF(DWORD numfaces, DWORD numvertices, DWORD options, DWORD FVF, + LPDIRECT3DDEVICE9 device, LPD3DXMESH *mesh) +{ + FIXME("(%d, %d, %d, %d, %p, %p): stub\n", numfaces, numvertices, options, FVF, device, mesh); + + return E_NOTIMPL; +} + HRESULT WINAPI D3DXCreateBox(LPDIRECT3DDEVICE9 device, FLOAT width, FLOAT height, FLOAT depth, LPD3DXMESH* mesh, LPD3DXBUFFER* adjacency) { diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index 940e39e..4bbc768 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -661,6 +661,14 @@ static void D3DXIntersectTriTest(void) ok( got_res == exp_res, "Expected result = %d, got %d\n",exp_res,got_res); } +static void D3DXCreateMeshFVFTest(void) +{ + HRESULT hr; + + hr = D3DXCreateMeshFVF(0, 0, 0, 0, NULL, NULL); + todo_wine ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); +} + struct sincos_table { float *sin; @@ -1041,6 +1049,7 @@ START_TEST(mesh) D3DXDeclaratorFromFVFTest(); D3DXGetFVFVertexSizeTest(); D3DXIntersectTriTest(); + D3DXCreateMeshFVFTest(); D3DXCreateSphereTest(); test_get_decl_vertex_size(); } diff --git a/include/d3dx9mesh.h b/include/d3dx9mesh.h index 5773d24..13629aa 100644 --- a/include/d3dx9mesh.h +++ b/include/d3dx9mesh.h @@ -124,6 +124,7 @@ DECLARE_INTERFACE_(ID3DXMesh, ID3DXBaseMesh) extern "C" { #endif +HRESULT WINAPI D3DXCreateMeshFVF(DWORD, DWORD, DWORD, DWORD, LPDIRECT3DDEVICE9, LPD3DXMESH *); HRESULT WINAPI D3DXCreateBuffer(DWORD, LPD3DXBUFFER*); UINT WINAPI D3DXGetDeclVertexSize(const D3DVERTEXELEMENT9 *decl, DWORD stream_idx); UINT WINAPI D3DXGetFVFVertexSize(DWORD); -- 1.7.1