[PATCH 6/7] d3dx9: Add tests for D3DXCreateSphere vertex buffer description.

Misha Koshelev misha680 at gmail.com
Wed Jun 23 22:18:58 CDT 2010


---
 dlls/d3dx9_36/tests/shape.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/dlls/d3dx9_36/tests/shape.c b/dlls/d3dx9_36/tests/shape.c
index d45ba4e..5248405 100644
--- a/dlls/d3dx9_36/tests/shape.c
+++ b/dlls/d3dx9_36/tests/shape.c
@@ -25,6 +25,7 @@ static void test_create_sphere(IDirect3DDevice9* device)
     LPD3DXMESH sphere = NULL;
     DWORD number_of_vertices;
     LPDIRECT3DVERTEXBUFFER9 vertex_buffer = NULL;
+    D3DVERTEXBUFFER_DESC vertex_buffer_description;
     BYTE *vertex_data = NULL;
 
     hr = D3DXCreateSphere(NULL, 0.0, 0, 0, NULL, NULL);
@@ -55,6 +56,19 @@ static void test_create_sphere(IDirect3DDevice9* device)
 
         if (vertex_buffer)
         {
+            hr = IDirect3DVertexBuffer9_GetDesc(vertex_buffer, &vertex_buffer_description);
+            todo_wine ok( hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n",hr);
+
+            if (hr == D3D_OK)
+            {
+                todo_wine ok( vertex_buffer_description.Format == D3DFMT_VERTEXDATA, "Got result %x, expected %x (D3DFMT_VERTEXDATA)\n",vertex_buffer_description.Format,D3DFMT_VERTEXDATA);
+                todo_wine ok( vertex_buffer_description.Type == D3DRTYPE_VERTEXBUFFER, "Got result %x, expected %x (D3DRTYPE_VERTEXBUFFER)\n",vertex_buffer_description.Type,D3DRTYPE_VERTEXBUFFER);
+                todo_wine ok( vertex_buffer_description.Usage == 0, "Got result %x, expected %x\n",vertex_buffer_description.Usage,0);
+                todo_wine ok( vertex_buffer_description.Pool == D3DPOOL_MANAGED, "Got result %x, expected %x (D3DPOOL_DEFAULT)\n",vertex_buffer_description.Pool,D3DPOOL_DEFAULT);
+                todo_wine ok( vertex_buffer_description.Size == 0x60, "Got result %x, expected 60\n",vertex_buffer_description.Size);
+                todo_wine ok( vertex_buffer_description.FVF == D3DFVF_XYZ | D3DFVF_NORMAL, "Got result %x, expected %x (D3DFVF_XYZ | D3DFVF_NORMAL)\n",vertex_buffer_description.FVF,D3DFVF_XYZ | D3DFVF_NORMAL);
+            }
+
             hr = IDirect3DVertexBuffer9_Lock(vertex_buffer, 0, 0, &vertex_data, D3DLOCK_DISCARD);
             todo_wine ok( hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n",hr);
 
-- 
1.7.1







More information about the wine-patches mailing list