diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index d40407342e7..ee15fdb5580 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -1994,6 +1994,30 @@ static void D3DXLoadMeshTest(void) "TextureFilename { \"texture.jpg\"; }" "}" "}" + "MeshVertexColors {" + "8;" /* DWORD nVertexColors; */ + /* array IndexedColor vertexColors[nVertexColors]; */ + "0; 0.0; 0.0; 0.0; 0.0;;" + "1; 0.0; 0.0; 1.0; 0.1;;" + "2; 0.0; 1.0; 0.0; 0.2;;" + "3; 0.0; 1.0; 1.0; 0.3;;" + "4; 1.0; 0.0; 0.0; 0.4;;" + "5; 1.0; 0.0; 1.0; 0.5;;" + "6; 1.0; 1.0; 0.0; 0.6;;" + "7; 1.0; 1.0; 1.0; 0.7;;" + "}" + "MeshTextureCoords {" + "8;" /* DWORD nTextureCoords; */ + /* array Coords2d textureCoords[nTextureCoords]; */ + "0.0; 1.0;," + "1.0; 1.0;," + "0.0; 0.0;," + "1.0; 0.0;," + "1.0; 1.0;," + "0.0; 1.0;," + "1.0; 0.0;," + "0.0; 0.0;;" + "}" "}"; static const WORD box_index_buffer[] = { 0, 1, 3, @@ -2012,31 +2036,33 @@ static void D3DXLoadMeshTest(void) static const struct { D3DXVECTOR3 position; D3DXVECTOR3 normal; + D3DCOLOR diffuse; + D3DXVECTOR2 tex_coords; } box_vertex_buffer[] = { - {{0.0, 0.0, 0.0}, {-1.0, 0.0, 0.0}}, - {{0.0, 0.0, 1.0}, {-1.0, 0.0, 0.0}}, - {{0.0, 1.0, 0.0}, {-1.0, 0.0, 0.0}}, - {{0.0, 1.0, 1.0}, {-1.0, 0.0, 0.0}}, - {{1.0, 0.0, 0.0}, {1.0, 0.0, 0.0}}, - {{1.0, 0.0, 1.0}, {1.0, 0.0, 0.0}}, - {{1.0, 1.0, 0.0}, {0.0, 1.0, 0.0}}, - {{1.0, 1.0, 1.0}, {0.0, 1.0, 0.0}}, - {{0.0, 1.0, 0.0}, {0.0, 1.0, 0.0}}, - {{0.0, 1.0, 1.0}, {0.0, 1.0, 0.0}}, - {{1.0, 1.0, 0.0}, {1.0, 0.0, 0.0}}, - {{1.0, 1.0, 1.0}, {1.0, 0.0, 0.0}}, - {{0.0, 0.0, 1.0}, {0.0, -1.0, 0.0}}, - {{0.0, 0.0, 0.0}, {0.0, -1.0, 0.0}}, - {{1.0, 0.0, 0.0}, {0.0, -1.0, 0.0}}, - {{1.0, 0.0, 1.0}, {0.0, -1.0, 0.0}}, - {{0.0, 0.0, 1.0}, {0.0, 0.0, 1.0}}, - {{1.0, 0.0, 1.0}, {0.0, 0.0, 1.0}}, - {{1.0, 1.0, 1.0}, {0.0, 0.0, 1.0}}, - {{0.0, 1.0, 1.0}, {0.0, 0.0, 1.0}}, - {{0.0, 0.0, 0.0}, {0.0, 0.0, -1.0}}, - {{0.0, 1.0, 0.0}, {0.0, 0.0, -1.0}}, - {{1.0, 1.0, 0.0}, {0.0, 0.0, -1.0}}, - {{1.0, 0.0, 0.0}, {0.0, 0.0, -1.0}}, + {{0.0, 0.0, 0.0}, {-1.0, 0.0, 0.0}, 0x00000000, {0.0, 1.0}}, + {{0.0, 0.0, 1.0}, {-1.0, 0.0, 0.0}, 0x1a0000ff, {1.0, 1.0}}, + {{0.0, 1.0, 0.0}, {-1.0, 0.0, 0.0}, 0x3300ff00, {0.0, 0.0}}, + {{0.0, 1.0, 1.0}, {-1.0, 0.0, 0.0}, 0x4d00ffff, {1.0, 0.0}}, + {{1.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, 0x66ff0000, {1.0, 1.0}}, + {{1.0, 0.0, 1.0}, {1.0, 0.0, 0.0}, 0x80ff00ff, {0.0, 1.0}}, + {{1.0, 1.0, 0.0}, {0.0, 1.0, 0.0}, 0x99ffff00, {1.0, 0.0}}, + {{1.0, 1.0, 1.0}, {0.0, 1.0, 0.0}, 0xb3ffffff, {0.0, 0.0}}, + {{0.0, 1.0, 0.0}, {0.0, 1.0, 0.0}, 0x3300ff00, {0.0, 0.0}}, + {{0.0, 1.0, 1.0}, {0.0, 1.0, 0.0}, 0x4d00ffff, {1.0, 0.0}}, + {{1.0, 1.0, 0.0}, {1.0, 0.0, 0.0}, 0x99ffff00, {1.0, 0.0}}, + {{1.0, 1.0, 1.0}, {1.0, 0.0, 0.0}, 0xb3ffffff, {0.0, 0.0}}, + {{0.0, 0.0, 1.0}, {0.0, -1.0, 0.0}, 0x1a0000ff, {1.0, 1.0}}, + {{0.0, 0.0, 0.0}, {0.0, -1.0, 0.0}, 0x00000000, {0.0, 1.0}}, + {{1.0, 0.0, 0.0}, {0.0, -1.0, 0.0}, 0x66ff0000, {1.0, 1.0}}, + {{1.0, 0.0, 1.0}, {0.0, -1.0, 0.0}, 0x80ff00ff, {0.0, 1.0}}, + {{0.0, 0.0, 1.0}, {0.0, 0.0, 1.0}, 0x1a0000ff, {1.0, 1.0}}, + {{1.0, 0.0, 1.0}, {0.0, 0.0, 1.0}, 0x80ff00ff, {0.0, 1.0}}, + {{1.0, 1.0, 1.0}, {0.0, 0.0, 1.0}, 0xb3ffffff, {0.0, 0.0}}, + {{0.0, 1.0, 1.0}, {0.0, 0.0, 1.0}, 0x4d00ffff, {1.0, 0.0}}, + {{0.0, 0.0, 0.0}, {0.0, 0.0, -1.0}, 0x00000000, {0.0, 1.0}}, + {{0.0, 1.0, 0.0}, {0.0, 0.0, -1.0}, 0x3300ff00, {0.0, 0.0}}, + {{1.0, 1.0, 0.0}, {0.0, 0.0, -1.0}, 0x99ffff00, {1.0, 0.0}}, + {{1.0, 0.0, 0.0}, {0.0, 0.0, -1.0}, 0x66ff0000, {1.0, 1.0}}, }; static const D3DXMATERIAL box_materials[] = { { @@ -2060,7 +2086,7 @@ static void D3DXLoadMeshTest(void) (char *)"texture.jpg", /* pTextureFilename */ }, }; - const DWORD box_fvf = D3DFVF_XYZ | D3DFVF_NORMAL; + const DWORD box_fvf = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX1; /*________________________*/ HRESULT hr; HWND wnd = NULL;