35#define TRACECALLBACK if(winetest_debug > 1) trace
37#define admitted_error 0.0001f
39#define compare_vertex_sizes(type, exp) \
40 got=D3DXGetFVFVertexSize(type); \
41 ok(got==exp, "Expected: %d, Got: %d\n", exp, got);
43#define compare_float(got, exp) \
47 ok(_got == _exp, "Expected: %g, Got: %g\n", _exp, _got); \
65#define check_floats(got, exp, dim) check_floats_(__LINE__, "", got, exp, dim)
69 char exp_buffer[256] =
"";
70 char got_buffer[256] =
"";
71 char *exp_buffer_ptr = exp_buffer;
72 char *got_buffer_ptr = got_buffer;
75 for (
i = 0;
i < dim;
i++) {
77 exp_buffer_ptr +=
sprintf(exp_buffer_ptr,
", ");
78 got_buffer_ptr +=
sprintf(got_buffer_ptr,
", ");
81 exp_buffer_ptr +=
sprintf(exp_buffer_ptr,
"%g", *
exp);
82 got_buffer_ptr +=
sprintf(got_buffer_ptr,
"%g", *got);
85 ok_(__FILE__,
line)(
equal,
"%sExpected (%s), got (%s)",
prefix, exp_buffer, got_buffer);
98 return (
a[0]==
b[0] &&
a[1] ==
b[1] &&
a[2] ==
b[2]);
124 skip(
"Couldn't create application window\n");
131 skip(
"Couldn't create IDirect3D9 object\n");
135 memset(&d3dpp, 0,
sizeof(d3dpp));
142 skip(
"Couldn't create IDirect3DDevice9 object %#lx\n",
hr);
149 skip(
"Couldn't allocate memory for test_context\n");
229 DWORD number_of_vertices, number_of_faces;
231 IDirect3DIndexBuffer9 *index_buffer;
238 number_of_vertices = d3dxmesh->lpVtbl->GetNumVertices(d3dxmesh);
242 number_of_faces = d3dxmesh->lpVtbl->GetNumFaces(d3dxmesh);
252 skip(
"Couldn't get vertex buffer\n");
261 skip(
"Couldn't get vertex buffer description\n");
269 ok(vertex_buffer_description.
Usage == 0,
"Test %s, result %lx, expected %x\n",
name, vertex_buffer_description.
Usage, 0);
270 ok(vertex_buffer_description.
Pool ==
D3DPOOL_MANAGED,
"Test %s, result %x, expected %x (D3DPOOL_MANAGED)\n",
272 ok(vertex_buffer_description.
FVF ==
mesh->
fvf,
"Test %s, result %lx, expected %lx\n",
282 ok(vertex_buffer_description.
Size ==
expected,
"Test %s, result %x, expected %x\n",
293 skip(
"Couldn't lock vertex buffer\n");
297 for (
i = 0;
i < number_of_vertices;
i++)
300 "Test %s, vertex position %d, result (%g, %g, %g), expected (%g, %g, %g)\n",
name,
i,
301 vertices[
i].position.x, vertices[
i].position.y, vertices[
i].position.z,
304 "Test %s, vertex normal %d, result (%g, %g, %g), expected (%g, %g, %g)\n",
name,
i,
305 vertices[
i].normal.x, vertices[
i].normal.y, vertices[
i].normal.z,
316 hr = d3dxmesh->lpVtbl->GetIndexBuffer(d3dxmesh, &index_buffer);
321 skip(
"Couldn't get index buffer\n");
330 skip(
"Couldn't get index buffer description\n");
334 ok(index_buffer_description.
Format ==
D3DFMT_INDEX16,
"Test %s, result %x, expected %x (D3DFMT_INDEX16)\n",
338 ok(index_buffer_description.
Usage == 0,
"Test %s, result %#lx, expected %#x.\n",
339 name, index_buffer_description.
Usage, 0);
340 ok(index_buffer_description.
Pool ==
D3DPOOL_MANAGED,
"Test %s, result %x, expected %x (D3DPOOL_MANAGED)\n",
343 ok(index_buffer_description.
Size ==
expected,
"Test %s, result %x, expected %x\n",
354 skip(
"Couldn't lock index buffer\n");
358 for (
i = 0;
i < number_of_faces;
i++)
361 "Test %s, face %d, result (%u, %u, %u), expected (%u, %u, %u)\n",
name,
i,
362 faces[
i][0], faces[
i][1], faces[
i][2],
376 D3DXVECTOR3 bottom_point, center, top_point, raydirection, rayposition;
380 bottom_point.
x = -3.0f; bottom_point.
y = -2.0f; bottom_point.
z = -1.0f;
381 top_point.
x = 7.0f; top_point.
y = 8.0f; top_point.
z = 9.0f;
383 raydirection.
x = -4.0f; raydirection.
y = -5.0f; raydirection.
z = -6.0f;
384 rayposition.
x = 5.0f; rayposition.
y = 5.0f; rayposition.
z = 11.0f;
388 raydirection.
x = 4.0f; raydirection.
y = 5.0f; raydirection.
z = 6.0f;
389 rayposition.
x = 5.0f; rayposition.
y = 5.0f; rayposition.
z = 11.0f;
393 rayposition.
x = -4.0f; rayposition.
y = 1.0f; rayposition.
z = -2.0f;
397 bottom_point.
x = 1.0f; bottom_point.
y = 0.0f; bottom_point.
z = 0.0f;
398 top_point.
x = 1.0f; top_point.
y = 0.0f; top_point.
z = 0.0f;
399 rayposition.
x = 0.0f; rayposition.
y = 1.0f; rayposition.
z = 0.0f;
400 raydirection.
x = 0.0f; raydirection.
y = 3.0f; raydirection.
z = 0.0f;
404 bottom_point.
x = 1.0f; bottom_point.
y = 2.0f; bottom_point.
z = 3.0f;
405 top_point.
x = 10.0f; top_point.
y = 15.0f; top_point.
z = 20.0f;
407 raydirection.
x = 7.0f; raydirection.
y = 8.0f; raydirection.
z = 9.0f;
408 rayposition.
x = 3.0f; rayposition.
y = 7.0f; rayposition.
z = -6.0f;
412 bottom_point.
x = 0.0f; bottom_point.
y = 0.0f; bottom_point.
z = 0.0f;
413 top_point.
x = 1.0f; top_point.
y = 1.0f; top_point.
z = 1.0f;
415 raydirection.
x = 0.0f; raydirection.
y = 1.0f; raydirection.
z = .0f;
416 rayposition.
x = -3.0f; rayposition.
y = 0.0f; rayposition.
z = 0.0f;
420 raydirection.
x = 1.0f; raydirection.
y = 0.0f; raydirection.
z = .0f;
421 rayposition.
x = -3.0f; rayposition.
y = 0.0f; rayposition.
z = 0.0f;
426 radius =
sqrt(77.0f);
427 center.
x = 1.0f; center.
y = 2.0f; center.
z = 3.0f;
428 raydirection.
x = 2.0f; raydirection.
y = -4.0f; raydirection.
z = 2.0f;
429 rayposition.
x = 5.0f; rayposition.
y = 5.0f; rayposition.
z = 9.0f;
433 rayposition.
x = 45.0f; rayposition.
y = -75.0f; rayposition.
z = 49.0f;
437 raydirection.
x = -2.0f; raydirection.
y = 4.0f; raydirection.
z = -2.0f;
441 rayposition.
x = 5.0f; rayposition.
y = 11.0f; rayposition.
z = 9.0f;
445 raydirection.
x = 2.0f; raydirection.
y = -4.0f; raydirection.
z = 2.0f;
450 rayposition.
x = 2.0f; rayposition.
y = 2.0f; rayposition.
z = 3.0f;
454 raydirection.
x = 0.0f; raydirection.
y = 0.0f; raydirection.
z = 1.0f;
478 exp_min.
x = 1.0f; exp_min.
y = 1.0f; exp_min.
z = 1.0f;
479 exp_max.
x = 9.0f; exp_max.
y = 9.0f; exp_max.
z = 9.0f;
484 ok(
compare_vec3(exp_min,got_min),
"Expected min: (%f, %f, %f), got: (%f, %f, %f)\n", exp_min.
x,exp_min.
y,exp_min.
z,got_min.
x,got_min.
y,got_min.
z);
485 ok(
compare_vec3(exp_max,got_max),
"Expected max: (%f, %f, %f), got: (%f, %f, %f)\n", exp_max.
x,exp_max.
y,exp_max.
z,got_max.
x,got_max.
y,got_max.
z);
495 exp_min.
x = -6.92f; exp_min.
y = -8.1f; exp_min.
z = -3.80f;
496 exp_max.
x = 11.4f; exp_max.
y = 7.90f; exp_max.
z = 11.9f;
501 ok(
compare_vec3(exp_min,got_min),
"Expected min: (%f, %f, %f), got: (%f, %f, %f)\n", exp_min.
x,exp_min.
y,exp_min.
z,got_min.
x,got_min.
y,got_min.
z);
502 ok(
compare_vec3(exp_max,got_max),
"Expected max: (%f, %f, %f), got: (%f, %f, %f)\n", exp_max.
x,exp_max.
y,exp_max.
z,got_max.
x,got_max.
y,got_max.
z);
512 exp_min.
x = -6.92f; exp_min.
y = -0.9f; exp_min.
z = -3.8f;
513 exp_max.
x = 7.43f; exp_max.
y = 7.90f; exp_max.
z = 11.9f;
518 ok(
compare_vec3(exp_min,got_min),
"Expected min: (%f, %f, %f), got: (%f, %f, %f)\n", exp_min.
x,exp_min.
y,exp_min.
z,got_min.
x,got_min.
y,got_min.
z);
519 ok(
compare_vec3(exp_max,got_max),
"Expected max: (%f, %f, %f), got: (%f, %f, %f)\n", exp_max.
x,exp_max.
y,exp_max.
z,got_max.
x,got_max.
y,got_max.
z);
537 FLOAT exp_rad, got_rad;
547 exp_cen.
x = 5.0; exp_cen.
y = 5.0; exp_cen.
z = 5.0;
552 ok(
compare(exp_rad, got_rad),
"Expected radius: %f, got radius: %f\n", exp_rad, got_rad);
553 ok(
compare_vec3(exp_cen,got_cen),
"Expected center: (%f, %f, %f), got center: (%f, %f, %f)\n", exp_cen.
x,exp_cen.
y,exp_cen.
z,got_cen.
x,got_cen.
y,got_cen.
z);
563 exp_rad = 13.707883f;
564 exp_cen.
x = 2.408f; exp_cen.
y = 2.22f; exp_cen.
z = 3.76f;
569 ok(
compare(exp_rad, got_rad),
"Expected radius: %f, got radius: %f\n", exp_rad, got_rad);
570 ok(
compare_vec3(exp_cen,got_cen),
"Expected center: (%f, %f, %f), got center: (%f, %f, %f)\n", exp_cen.
x,exp_cen.
y,exp_cen.
z,got_cen.
x,got_cen.
y,got_cen.
z);
594 "[Element %d] Stream = %d, Offset = %d, Type = %d, Method = %d, Usage = %d, UsageIndex = %d\n",
602 unsigned int line,
unsigned int test_id)
613 if (!end1 && !end2)
break;
616 ok(!
status,
"Line %u, test %u: Mismatch in size, test declaration is %s than expected.\n",
617 line, test_id, end1 ?
"shorter" :
"longer");
625 ok(!
status,
"Line %u, test %u: Mismatch in element %u.\n",
line, test_id,
i);
642 "Line %u, test %u: D3DXDeclaratorFromFVF returned %#lx, expected %#lx.\n",
651 DWORD result_fvf = 0xdeadbeef;
655 "Line %u, test %u: D3DXFVFFromDeclarator returned %#lx, expected %#lx.\n",
659 ok(expected_fvf == result_fvf,
"Line %u, test %u: Got FVF %#lx, expected %#lx.\n",
660 line, test_id, result_fvf, expected_fvf);
888 decl,
D3D_OK, __LINE__, 0);
1108 BOOL exp_res, got_res;
1110 FLOAT exp_dist, got_dist, exp_u, got_u, exp_v, got_v;
1118 ray.
x = 2.0f; ray.
y = 3.0f; ray.
z = 4.0f;
1120 exp_res =
TRUE; exp_u = 0.5f; exp_v = 0.25f; exp_dist = 8.0f;
1123 ok(got_res == exp_res,
"Expected result %d, got %d.\n", exp_res, got_res);
1124 ok(
compare(exp_u, got_u),
"Expected u %f, got %f.\n", exp_u, got_u);
1125 ok(
compare(exp_v, got_v),
"Expected v %f, got %f.\n", exp_v, got_v);
1126 ok(
compare(exp_dist, got_dist),
"Expected distance %f, got %f.\n", exp_dist, got_dist);
1129 ok(got_res == exp_res,
"Expected result %d, got %d.\n", exp_res, got_res);
1135 got_u = got_v = got_dist = 0.0f;
1137 ok(got_res == exp_res,
"Expected result %d, got %d.\n", exp_res, got_res);
1138 ok(
compare(exp_u, got_u),
"Expected u %f, got %f.\n", exp_u, got_u);
1139 ok(
compare(exp_v, got_v),
"Expected v %f, got %f.\n", exp_v, got_v);
1140 ok(
compare(exp_dist, got_dist),
"Expected distance %f, got %f.\n", exp_dist, got_dist);
1148 got_u = got_v = got_dist = 0.0f;
1150 ok(got_res == exp_res,
"Expected result %d, got %d.\n", exp_res, got_res);
1151 ok(
compare(exp_u, got_u),
"Expected u %f, got %f.\n", exp_u, got_u);
1152 ok(
compare(exp_v, got_v),
"Expected v %f, got %f.\n", exp_v, got_v);
1153 ok(
compare(exp_dist, got_dist),
"Expected distance %f, got %f.\n", exp_dist, got_dist);
1164 ray.
x = 2.0f; ray.
y = 3.0f; ray.
z = 4.0f;
1169 ok( got_res == exp_res,
"Expected result = %d, got %d\n",exp_res,got_res);
1172 ok(got_res == exp_res,
"Expected result = %d, got %d\n", exp_res, got_res);
1182 ray.
x = 1.0f; ray.
y = 0.0f; ray.
z = 0.0f;
1187 ok( got_res == exp_res,
"Expected result = %d, got %d\n",exp_res,got_res);
1190 ok(got_res == exp_res,
"Expected result = %d, got %d\n", exp_res, got_res);
1197 ID3DXMesh *d3dxmesh;
1239 skip(
"Couldn't create test context\n");
1255 d3dxmesh->lpVtbl->Release(d3dxmesh);
1265 ok(
hr ==
D3D_OK,
"Got result %lx, expected 0 (D3D_OK)\n",
hr);
1270 hr = d3dxmesh->lpVtbl->GetDevice(d3dxmesh,
NULL);
1273 hr = d3dxmesh->lpVtbl->GetDevice(d3dxmesh, &test_device);
1275 ok(test_device ==
device,
"Got result %p, expected %p\n", test_device,
device);
1283 hr = d3dxmesh->lpVtbl->GetDeclaration(d3dxmesh,
NULL);
1286 hr = d3dxmesh->lpVtbl->GetDeclaration(d3dxmesh, test_decl);
1287 ok(
hr ==
D3D_OK,
"Got result %lx, expected 0 (D3D_OK)\n",
hr);
1292 for (
i = 0;
i <
size - 1;
i++)
1295 ok(test_decl[
i].
Type == decl1[
i].
Type,
"Returned type %d, expected %d\n", test_decl[
i].
Type, decl1[
i].
Type);
1296 ok(test_decl[
i].Method == decl1[
i].Method,
"Returned method %d, expected %d\n", test_decl[
i].Method, decl1[
i].Method);
1298 ok(test_decl[
i].UsageIndex == decl1[
i].UsageIndex,
"Returned usage index %d, expected %d\n", test_decl[
i].UsageIndex, decl1[
i].UsageIndex);
1301 ok(decl1[
size-1].
Stream == 0xFF,
"Returned too long vertex declaration\n");
1305 options = d3dxmesh->lpVtbl->GetOptions(d3dxmesh);
1311 skip(
"Couldn't create mesh\n");
1324 d3dxmesh->lpVtbl->Release(d3dxmesh);
1329 ok(
hr ==
D3D_OK,
"Got result %lx, expected 0 (D3D_OK)\n",
hr);
1334 hr = d3dxmesh->lpVtbl->GetDevice(d3dxmesh,
NULL);
1337 hr = d3dxmesh->lpVtbl->GetDevice(d3dxmesh, &test_device);
1339 ok(test_device ==
device,
"Got result %p, expected %p\n", test_device,
device);
1347 hr = d3dxmesh->lpVtbl->GetDeclaration(d3dxmesh, test_decl);
1348 ok(
hr ==
D3D_OK,
"Got result %lx, expected 0 (D3D_OK)\n",
hr);
1353 for (
i = 0;
i <
size - 1;
i++)
1356 ok(test_decl[
i].
Type == decl2[
i].
Type,
"Returned type %d, expected %d\n", test_decl[
i].
Type, decl2[
i].
Type);
1357 ok(test_decl[
i].Method == decl2[
i].Method,
"Returned method %d, expected %d\n", test_decl[
i].Method, decl2[
i].Method);
1359 ok(test_decl[
i].UsageIndex == decl2[
i].UsageIndex,
"Returned usage index %d, expected %d\n", test_decl[
i].UsageIndex, decl2[
i].UsageIndex);
1362 ok(decl2[
size-1].
Stream == 0xFF,
"Returned too long vertex declaration\n");
1366 options = d3dxmesh->lpVtbl->GetOptions(d3dxmesh);
1372 skip(
"Couldn't create mesh\n");
1389 d3dxmesh->lpVtbl->Release(d3dxmesh);
1403 ID3DXMesh *d3dxmesh;
1426 skip(
"Couldn't create test context\n");
1442 d3dxmesh->lpVtbl->Release(d3dxmesh);
1452 ok(
hr ==
D3D_OK,
"Got result %lx, expected 0 (D3D_OK)\n",
hr);
1457 hr = d3dxmesh->lpVtbl->GetDevice(d3dxmesh,
NULL);
1460 hr = d3dxmesh->lpVtbl->GetDevice(d3dxmesh, &test_device);
1462 ok(test_device ==
device,
"Got result %p, expected %p\n", test_device,
device);
1470 hr = d3dxmesh->lpVtbl->GetDeclaration(d3dxmesh,
NULL);
1473 hr = d3dxmesh->lpVtbl->GetDeclaration(d3dxmesh, test_decl);
1474 ok(
hr ==
D3D_OK,
"Got result %lx, expected 0 (D3D_OK)\n",
hr);
1479 for (
i = 0;
i <
size - 1;
i++)
1482 ok(test_decl[
i].
Type == decl[
i].
Type,
"Returned type %d, expected %d\n", test_decl[
i].
Type, decl[
i].
Type);
1483 ok(test_decl[
i].Method == decl[
i].Method,
"Returned method %d, expected %d\n", test_decl[
i].Method, decl[
i].Method);
1485 ok(test_decl[
i].UsageIndex == decl[
i].UsageIndex,
"Returned usage index %d, expected %d\n",
1486 test_decl[
i].UsageIndex, decl[
i].UsageIndex);
1489 ok(decl[
size-1].
Stream == 0xFF,
"Returned too long vertex declaration\n");
1493 options = d3dxmesh->lpVtbl->GetOptions(d3dxmesh);
1499 skip(
"Couldn't create mesh\n");
1512 d3dxmesh->lpVtbl->Release(d3dxmesh);
1518#define check_vertex_buffer(mesh, vertices, num_vertices, fvf) \
1519 check_vertex_buffer_(__LINE__, mesh, vertices, num_vertices, fvf)
1522 DWORD mesh_num_vertices =
mesh->lpVtbl->GetNumVertices(
mesh);
1524 const void *mesh_vertices;
1527 ok_(__FILE__,
line)(fvf == mesh_fvf,
"expected FVF %lx, got %lx\n", fvf, mesh_fvf);
1528 ok_(__FILE__,
line)(num_vertices == mesh_num_vertices,
1529 "Expected %lu vertices, got %lu\n", num_vertices, mesh_num_vertices);
1536 if (mesh_fvf == fvf) {
1539 for (
i = 0;
i <
min(num_vertices, mesh_num_vertices);
i++)
1541 const FLOAT *exp_float = vertices;
1542 const FLOAT *got_float = mesh_vertices;
1561 last_beta_dword =
TRUE;
1568 exp_float += pos_dim;
1569 got_float += pos_dim;
1571 if (last_beta_dword) {
1573 "Vertex[%lu]: Expected last beta %08lx, got %08lx\n",
i, *(
DWORD*)exp_float, *(
DWORD*)got_float);
1586 "Vertex[%lu]: Expected psize %g, got %g\n",
i, *exp_float, *got_float);
1592 "Vertex[%lu]: Expected diffuse %08lx, got %08lx\n",
i, *(
DWORD*)exp_float, *(
DWORD*)got_float);
1598 "Vertex[%lu]: Expected specular %08lx, got %08lx\n",
i, *(
DWORD*)exp_float, *(
DWORD*)got_float);
1604 for (
j = 0;
j < texcount;
j++) {
1605 DWORD dim = (((fvf >> (16 + 2 *
j)) + 1) & 0x03) + 1;
1612 vertices = (
BYTE*)vertices + vertex_size;
1613 mesh_vertices = (
BYTE*)mesh_vertices + vertex_size;
1617 mesh->lpVtbl->UnlockVertexBuffer(
mesh);
1620#define check_index_buffer(mesh, indices, num_indices, index_size) \
1621 check_index_buffer_(__LINE__, mesh, indices, num_indices, index_size)
1625 DWORD mesh_num_indices =
mesh->lpVtbl->GetNumFaces(
mesh) * 3;
1626 const void *mesh_indices;
1630 ok_(__FILE__,
line)(index_size == mesh_index_size,
1631 "Expected index size %lu, got %lu\n", index_size, mesh_index_size);
1632 ok_(__FILE__,
line)(num_indices == mesh_num_indices,
1633 "Expected %lu indices, got %lu\n", num_indices, mesh_num_indices);
1640 if (mesh_index_size == index_size) {
1641 for (
i = 0;
i <
min(num_indices, mesh_num_indices);
i++)
1643 if (index_size == 4)
1648 "Index[%lu]: expected %u, got %u\n",
i, *(
WORD*)
indices, *(
WORD*)mesh_indices);
1650 mesh_indices = (
BYTE*)mesh_indices + index_size;
1653 mesh->lpVtbl->UnlockIndexBuffer(
mesh);
1656#define check_matrix(got, expected) check_matrix_(__LINE__, got, expected)
1660 for (
i = 0;
i < 4;
i++) {
1661 for (
j = 0;
j < 4;
j++) {
1663 "matrix[%u][%u]: expected %g, got %g\n",
1672 "%sExpected (%g, %g, %g, %g), got (%g, %g, %g, %g)\n",
prefix,
1676#define check_materials(got, got_count, expected, expected_count) \
1677 check_materials_(__LINE__, got, got_count, expected, expected_count)
1683 ok_(__FILE__,
line)(got ==
NULL,
"Expected NULL material ptr, got %p\n", got);
1690 "Expected NULL pTextureFilename, got %p\n", got[
i].pTextureFilename);
1693 "Expected '%s' for pTextureFilename, got '%s'\n",
expected[
i].pTextureFilename, got[
i].pTextureFilename);
1703#define check_generated_adjacency(mesh, got, epsilon) check_generated_adjacency_(__LINE__, mesh, got, epsilon)
1712 skip_(__FILE__,
line)(
"Out of memory\n");
1720 for (
i = 0;
i < num_faces;
i++)
1725 "Face %u adjacencies: Expected (%lu, %lu, %lu), got (%lu, %lu, %lu)\n",
i,
1727 got[
i * 3], got[
i * 3 + 1], got[
i * 3 + 2]);
1733#define check_generated_effects(materials, num_materials, effects) \
1734 check_generated_effects_(__LINE__, materials, num_materials, effects)
1738 static const struct {
1744#define EFFECT_TABLE_ENTRY(str, field) \
1745 {str, sizeof(str), sizeof(materials->MatD3D.field), offsetof(D3DXMATERIAL, MatD3D.field)}
1751#undef EFFECT_TABLE_ENTRY
1754 if (!num_materials) {
1755 ok_(__FILE__,
line)(effects ==
NULL,
"Expected NULL effects, got %p\n", effects);
1758 for (
i = 0;
i < num_materials;
i++)
1764 "effect[%u] NumDefaults: Expected %lu, got %lu\n",
i,
1771 "effect[%u].pDefaults[%u].pParamName: Expected '%s', got '%s'\n",
i,
j,
1774 "effect[%u].pDefaults[%u].Type: Expected %u, got %u\n",
i,
j,
1777 "effect[%u].pDefaults[%u].NumBytes: Expected %lu, got %lu\n",
i,
j,
1784 "effect[%u].pDefaults[%u] float value %u: Expected %g, got %g\n",
i,
j,
k,
expected, got);
1789 static const char *expected_name =
"Texture0@Name";
1792 "effect[%u].pDefaults[%u].pParamName: Expected '%s', got '%s'\n",
i,
j,
1795 "effect[%u].pDefaults[%u].Type: Expected %u, got %u\n",
i,
j,
1797 if (materials[
i].pTextureFilename) {
1799 "effect[%u] texture filename length: Expected %lu, got %lu\n",
i,
1802 "effect[%u] texture filename: Expected '%s', got '%s'\n",
i,
1803 materials[
i].pTextureFilename, (
char*)got_param->
pValue);
1811 TRACECALLBACK(
"ID3DXAllocateHierarchyImpl_DestroyFrame(%p, %p)\n", iface, frame);
1824 TRACECALLBACK(
"ID3DXAllocateHierarchyImpl_CreateFrame(%p, '%s', %p)\n", iface,
name, new_frame);
1825 frame =
calloc(1,
sizeof(*frame));
1888 TRACECALLBACK(
"ID3DXAllocateHierarchyImpl_CreateMeshContainer(%p, '%s', %u, %p, %p, %p, %ld, %p, %p, %p)\n",
1890 num_materials, adjacency, skin_info, *new_mesh_container);
1903 if (num_materials) {
1909 for (
i = 0;
i < num_materials;
i++)
1911 for (
i = 0;
i < num_materials;
i++) {
1912 if (materials[
i].pTextureFilename) {
1922 for (
i = 0;
i < num_materials;
i++) {
1946 default_dest->
Type = default_src->
Type;
1953 ok(adjacency !=
NULL,
"Expected non-NULL adjacency, got NULL\n");
1956 ID3DXBaseMesh *basemesh = (ID3DXBaseMesh*)
mesh_data->pMesh;
1957 DWORD num_faces = basemesh->lpVtbl->GetNumFaces(basemesh);
1958 size_t size = num_faces *
sizeof(
DWORD) * 3;
1966 trace(
"FIXME: copying adjacency data for patch mesh not implemented\n");
1975 skin_info->lpVtbl->AddRef(skin_info);
1993#define test_LoadMeshFromX(device, xfile_str, vertex_array, fvf, index_array, materials_array, check_adjacency) \
1994 test_LoadMeshFromX_(__LINE__, device, xfile_str, sizeof(xfile_str) - 1, vertex_array, ARRAY_SIZE(vertex_array), fvf, \
1995 index_array, ARRAY_SIZE(index_array), sizeof(*index_array), materials_array, ARRAY_SIZE(materials_array), \
1998 const void *vertices,
DWORD num_vertices,
DWORD fvf,
const void *
indices,
DWORD num_indices,
size_t index_size,
2006 DWORD num_materials = 0;
2013 check_adjacency ? &adjacency :
NULL, &materials, &effects, &num_materials, &
mesh);
2022 check_materials_(
line, materials_ptr, num_materials, expected_materials, expected_num_materials);
2024 if (check_adjacency)
2030 IUnknown_Release(
mesh);
2034#define MAX_USER_DATA_COUNT 32
2072 hr = filedata->lpVtbl->GetType(filedata, &
data->guids[
data->data_count]);
2074 hr = filedata->lpVtbl->Lock(filedata, &sz, &
ptr);
2077 ok(sz >=
sizeof(
int),
"got %Iu.\n", sz);
2079 hr = filedata->lpVtbl->Unlock(filedata);
2098 ID3DXFileData *filedata)
2111 ID3DXFileData *filedata)
2159DEFINE_GUID(TID_TestDataGuid, 0x12345678, 0x1234, 0x1234, 0x12, 0x34, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11);
2163 static const char empty_xfile[] =
"xof 0303txt 0032";
2165 static const char simple_xfile[] =
2175 static const WORD simple_index_buffer[] = {0, 1, 2};
2176 static const D3DXVECTOR3 simple_vertex_buffer[] = {
2177 {0.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {1.0, 1.0, 0.0}
2180 static const char framed_xfile[] =
2182 "template TestData {"
2183 "<12345678-1234-1234-1234-111111111111>"
2191 "0.0; 0.0; 1.0; 1.0;;"
2204 "Mesh { 3; 0.0; 0.0; 0.0;, 0.0; 1.0; 0.0;, 1.0; 1.0; 0.0;; 1; 3; 0, 1, 2;;"
2209 "FrameTransformMatrix {"
2210 "1.0, 0.0, 0.0, 0.0,"
2211 "0.0, 1.0, 0.0, 0.0,"
2212 "0.0, 0.0, 1.0, 0.0,"
2213 "0.0, 0.0, 2.0, 1.0;;"
2218 "Mesh { 3; 0.0; 0.0; 0.0;, 0.0; 1.0; 0.0;, 2.0; 1.0; 0.0;; 1; 3; 0, 1, 2;; }"
2219 "FrameTransformMatrix {"
2220 "1.0, 0.0, 0.0, 0.0,"
2221 "0.0, 1.0, 0.0, 0.0,"
2222 "0.0, 0.0, 1.0, 0.0,"
2223 "0.0, 0.0, 3.0, 1.0;;"
2225 "Mesh { 3; 0.0; 0.0; 0.0;, 0.0; 1.0; 0.0;, 3.0; 1.0; 0.0;; 1; 3; 0, 1, 2;; }"
2228 static const struct test_user_data framed_xfile_expected_user_data[] =
2237 static const char framed_xfile_empty[] =
2241 " MeshNormals { 0;; 0;; }"
2245 static const WORD framed_index_buffer[] = { 0, 1, 2 };
2246 static const D3DXVECTOR3 framed_vertex_buffers[3][3] = {
2247 {{0.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {1.0, 1.0, 0.0}},
2248 {{0.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {2.0, 1.0, 0.0}},
2249 {{0.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {3.0, 1.0, 0.0}},
2251 static const WORD merged_index_buffer[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
2253 static const D3DXVECTOR3 merged_vertex_buffer[] = {
2254 {0.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {1.0, 1.0, 0.0},
2255 {0.0, 0.0, 2.0}, {0.0, 1.0, 2.0}, {2.0, 1.0, 2.0},
2256 {0.0, 0.0, 5.0}, {0.0, 1.0, 5.0}, {3.0, 1.0, 5.0},
2260 static const char box_xfile[] =
2262 "template TestData {"
2263 "<12345678-1234-1234-1234-111111111111>"
2306 "MeshMaterialList materials {"
2310 "0, 0, 0, 1, 1, 1;;"
2313 "0.0; 0.0; 1.0; 1.0;;"
2323 "1.0; 1.0; 1.0; 1.0;;"
2330 "TextureFilename { \"texture.jpg\"; }"
2337 "MeshVertexColors {"
2340 "0; 0.0; 0.0; 0.0; 0.0;;"
2341 "1; 0.0; 0.0; 1.0; 0.1;;"
2342 "2; 0.0; 1.0; 0.0; 0.2;;"
2343 "3; 0.0; 1.0; 1.0; 0.3;;"
2344 "4; 1.0; 0.0; 0.0; 0.4;;"
2345 "5; 1.0; 0.0; 1.0; 0.5;;"
2346 "6; 1.0; 1.0; 0.0; 0.6;;"
2347 "7; 1.0; 1.0; 1.0; 0.7;;"
2349 "MeshTextureCoords {"
2362 static const struct test_user_data box_xfile_expected_user_data[] =
2368 static const WORD box_index_buffer[] = {
2382 static const struct {
2387 } box_vertex_buffer[] = {
2388 {{0.0, 0.0, 0.0}, {-1.0, 0.0, 0.0}, 0x00000000, {0.0, 1.0}},
2389 {{0.0, 0.0, 1.0}, {-1.0, 0.0, 0.0}, 0x1a0000ff, {1.0, 1.0}},
2390 {{0.0, 1.0, 0.0}, {-1.0, 0.0, 0.0}, 0x3300ff00, {0.0, 0.0}},
2391 {{0.0, 1.0, 1.0}, {-1.0, 0.0, 0.0}, 0x4d00ffff, {1.0, 0.0}},
2392 {{1.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, 0x66ff0000, {1.0, 1.0}},
2393 {{1.0, 0.0, 1.0}, {1.0, 0.0, 0.0}, 0x80ff00ff, {0.0, 1.0}},
2394 {{1.0, 1.0, 0.0}, {0.0, 1.0, 0.0}, 0x99ffff00, {1.0, 0.0}},
2395 {{1.0, 1.0, 1.0}, {0.0, 1.0, 0.0}, 0xb3ffffff, {0.0, 0.0}},
2396 {{0.0, 1.0, 0.0}, {0.0, 1.0, 0.0}, 0x3300ff00, {0.0, 0.0}},
2397 {{0.0, 1.0, 1.0}, {0.0, 1.0, 0.0}, 0x4d00ffff, {1.0, 0.0}},
2398 {{1.0, 1.0, 0.0}, {1.0, 0.0, 0.0}, 0x99ffff00, {1.0, 0.0}},
2399 {{1.0, 1.0, 1.0}, {1.0, 0.0, 0.0}, 0xb3ffffff, {0.0, 0.0}},
2400 {{0.0, 0.0, 1.0}, {0.0, -1.0, 0.0}, 0x1a0000ff, {1.0, 1.0}},
2401 {{0.0, 0.0, 0.0}, {0.0, -1.0, 0.0}, 0x00000000, {0.0, 1.0}},
2402 {{1.0, 0.0, 0.0}, {0.0, -1.0, 0.0}, 0x66ff0000, {1.0, 1.0}},
2403 {{1.0, 0.0, 1.0}, {0.0, -1.0, 0.0}, 0x80ff00ff, {0.0, 1.0}},
2404 {{0.0, 0.0, 1.0}, {0.0, 0.0, 1.0}, 0x1a0000ff, {1.0, 1.0}},
2405 {{1.0, 0.0, 1.0}, {0.0, 0.0, 1.0}, 0x80ff00ff, {0.0, 1.0}},
2406 {{1.0, 1.0, 1.0}, {0.0, 0.0, 1.0}, 0xb3ffffff, {0.0, 0.0}},
2407 {{0.0, 1.0, 1.0}, {0.0, 0.0, 1.0}, 0x4d00ffff, {1.0, 0.0}},
2408 {{0.0, 0.0, 0.0}, {0.0, 0.0, -1.0}, 0x00000000, {0.0, 1.0}},
2409 {{0.0, 1.0, 0.0}, {0.0, 0.0, -1.0}, 0x3300ff00, {0.0, 0.0}},
2410 {{1.0, 1.0, 0.0}, {0.0, 0.0, -1.0}, 0x99ffff00, {1.0, 0.0}},
2411 {{1.0, 0.0, 0.0}, {0.0, 0.0, -1.0}, 0x66ff0000, {1.0, 1.0}},
2416 {0.0, 0.0, 1.0, 1.0},
2417 {0.0, 0.0, 0.0, 1.0},
2418 {1.0, 1.0, 1.0, 1.0},
2419 {0.0, 0.0, 0.0, 1.0},
2426 {1.0, 1.0, 1.0, 1.0},
2427 {0.0, 0.0, 0.0, 1.0},
2428 {1.0, 1.0, 1.0, 1.0},
2429 {0.0, 0.0, 0.0, 1.0},
2432 (
char *)
"texture.jpg",
2435 static const char box_anim_xfile[] =
2474 "MeshMaterialList materials {"
2478 "0, 0, 0, 1, 1, 1;;"
2481 "0.0; 0.0; 1.0; 1.0;;"
2491 "1.0; 1.0; 1.0; 1.0;;"
2498 "TextureFilename { \"texture.jpg\"; }"
2501 "MeshVertexColors {"
2504 "0; 0.0; 0.0; 0.0; 0.0;;"
2505 "1; 0.0; 0.0; 1.0; 0.1;;"
2506 "2; 0.0; 1.0; 0.0; 0.2;;"
2507 "3; 0.0; 1.0; 1.0; 0.3;;"
2508 "4; 1.0; 0.0; 0.0; 0.4;;"
2509 "5; 1.0; 0.0; 1.0; 0.5;;"
2510 "6; 1.0; 1.0; 0.0; 0.6;;"
2511 "7; 1.0; 1.0; 1.0; 0.7;;"
2513 "MeshTextureCoords {"
2527 "FrameTransformMatrix {"
2529 "1.0, 0.0, 0.0, 0.0,"
2530 "0.0, 1.0, 0.0, 0.0,"
2531 "0.0, 0.0, 1.0, 0.0,"
2532 "0.0, 0.0, 0.0, 1.0;;"
2536 "AnimationSet AnimationSet0 {"
2537 "Animation Animation0 {"
2543 "10; 3; -100.0, 0.0, 0.0;;,"
2544 "20; 3; -75.0, 0.0, 0.0;;,"
2545 "30; 3; -50.0, 0.0, 0.0;;,"
2546 "40; 3; -25.5, 0.0, 0.0;;,"
2547 "50; 3; 0.0, 0.0, 0.0;;,"
2548 "60; 3; 25.5, 0.0, 0.0;;,"
2549 "70; 3; 50.0, 0.0, 0.0;;,"
2550 "80; 3; 75.5, 0.0, 0.0;;,"
2551 "90; 3; 100.0, 0.0, 0.0;;;"
2561 {0.5, 0.5, 0.5, 0.0},
2562 {0.0, 0.0, 0.0, 0.0},
2563 {0.5, 0.5, 0.5, 0.0},
2564 {0.0, 0.0, 0.0, 0.0},
2576 ID3DXAnimationController *controller;
2583 skip(
"Couldn't create test context\n");
2617 ok(frame_hier->
Name ==
NULL,
"Expected NULL, got '%s'\n", frame_hier->
Name);
2634 controller = (ID3DXAnimationController *)0xdeadbeef;
2640 ok(controller !=
NULL,
"Animation Controller NULL.\n");
2645 controller->lpVtbl->Release(controller);
2650 controller = (ID3DXAnimationController *)0xdeadbeef;
2656 ok(!controller,
"Animation Controller returned.\n");
2657 ok(frame_hier->
Name ==
NULL,
"Expected NULL, got '%s'\n", frame_hier->
Name);
2690 ok(!
strcmp(frame_hier->
Name,
""),
"Expected '', got '%s'\n", frame_hier->
Name);
2696 for (
i = 0;
i < 3; ++
i)
2763 IUnknown_Release(
mesh);
2774 unsigned int i,
face;
2777 {-1.0f, -1.0f, -1.0f}, {-1.0f, -1.0f, 1.0f}, {-1.0f, 1.0f, 1.0f}, {-1.0f, 1.0f, -1.0f},
2778 {-1.0f, 1.0f, -1.0f}, {-1.0f, 1.0f, 1.0f}, { 1.0f, 1.0f, 1.0f}, { 1.0f, 1.0f, -1.0f},
2779 { 1.0f, 1.0f, -1.0f}, { 1.0f, 1.0f, 1.0f}, { 1.0f, -1.0f, 1.0f}, { 1.0f, -1.0f, -1.0f},
2780 {-1.0f, -1.0f, 1.0f}, {-1.0f, -1.0f, -1.0f}, { 1.0f, -1.0f, -1.0f}, { 1.0f, -1.0f, 1.0f},
2781 {-1.0f, -1.0f, 1.0f}, { 1.0f, -1.0f, 1.0f}, { 1.0f, 1.0f, 1.0f}, {-1.0f, 1.0f, 1.0f},
2782 {-1.0f, -1.0f, -1.0f}, {-1.0f, 1.0f, -1.0f}, { 1.0f, 1.0f, -1.0f}, { 1.0f, -1.0f, -1.0f}
2786 {-1.0f, 0.0f, 0.0f}, { 0.0f, 1.0f, 0.0f}, { 1.0f, 0.0f, 0.0f},
2787 { 0.0f, -1.0f, 0.0f}, { 0.0f, 0.0f, 1.0f}, { 0.0f, 0.0f, -1.0f}
2799 for (
i = 0;
i < 24;
i++)
2810 for (
i = 0;
i < 12;
i++)
2828 ok(
hr ==
D3D_OK,
"Got result %lx, expected 0 (D3D_OK)\n",
hr);
2831 skip(
"Couldn't create box\n");
2837 skip(
"Couldn't create mesh\n");
2838 box->lpVtbl->Release(
box);
2849 box->lpVtbl->Release(
box);
2858 static const DWORD adjacency[36]=
2864 1, 3, 11, 5, 6, 10};
2870 skip(
"Couldn't create test context\n");
2892 ok(
hr==
D3D_OK,
"Expected D3D_OK, received %#lx\n",
hr);
2896 ok(adjacency[
i]==
buffer[
i],
"expected adjacency %d: %#lx, received %#lx\n",
i,adjacency[
i],
buffer[
i]);
2898 box->lpVtbl->Release(
box);
2925 for (
i = 0;
i < sides; ++
i)
2952 ok(
hr ==
D3D_OK,
"Got result %lx, expected 0 (D3D_OK)\n",
hr);
2955 skip(
"Couldn't create polygon\n");
2961 skip(
"Couldn't create mesh\n");
2962 polygon->lpVtbl->Release(polygon);
2973 polygon->lpVtbl->Release(polygon);
2988 skip(
"Couldn't create test context\n");
3002 polygon = (
void *)0xdeadbeef;
3003 adjacency = (
void *)0xdeadbeef;
3006 ok(polygon == (
void *)0xdeadbeef,
"Polygon was changed to %p\n", polygon);
3007 ok(adjacency == (
void *)0xdeadbeef,
"Adjacency was changed to %p\n", adjacency);
3014 ok(
hr ==
D3D_OK,
"Expected D3D_OK, received %#lx\n",
hr);
3020 for (
i = 0;
i < 11; ++
i)
3022 ok(
buffer[
i][0] == (
i + 10) % 11,
"Wrong adjacency[%d][0] = %lu\n",
i,
buffer[
i][0]);
3027 polygon->lpVtbl->Release(polygon);
3070 angle = angle_start;
3071 for (
i = 0;
i <
n;
i++)
3075 angle += angle_step;
3089 float theta_step, theta_start;
3091 float phi_step, phi_start;
3093 DWORD number_of_vertices, number_of_faces;
3098 theta_step =
D3DX_PI / stacks;
3099 theta_start = theta_step;
3102 phi_step = -2 *
D3DX_PI / slices;
3115 number_of_vertices = 2 + slices * (stacks-1);
3116 number_of_faces = 2 * slices + (stacks - 2) * (2 * slices);
3118 if (!
new_mesh(
mesh, number_of_vertices, number_of_faces))
3229 ok(
hr ==
D3D_OK,
"Got result %lx, expected 0 (D3D_OK)\n",
hr);
3232 skip(
"Couldn't create sphere\n");
3238 skip(
"Couldn't create mesh\n");
3239 sphere->lpVtbl->Release(sphere);
3245 sprintf(
name,
"sphere (%g, %u, %u)", radius, slices, stacks);
3250 sphere->lpVtbl->Release(sphere);
3257 ID3DXMesh* sphere =
NULL;
3274 skip(
"Couldn't create test context\n");
3304 float theta_step, theta_start;
3306 FLOAT delta_radius, radius, radius_step;
3307 FLOAT z, z_step, z_normal;
3308 DWORD number_of_vertices, number_of_faces;
3313 theta_step = -2 *
D3DX_PI / slices;
3321 number_of_vertices = 2 + (slices * (3 + stacks));
3322 number_of_faces = 2 * slices + stacks * (2 * slices);
3324 if (!
new_mesh(
mesh, number_of_vertices, number_of_faces))
3333 delta_radius = radius1 - radius2;
3335 radius_step = delta_radius / stacks;
3338 z_step =
length / stacks;
3339 z_normal = delta_radius /
length;
3340 if (
isnan(z_normal))
3408 if (
stack < stacks + 1)
3411 radius -= radius_step;
3456 ok(
hr ==
D3D_OK,
"Got result %lx, expected 0 (D3D_OK)\n",
hr);
3459 skip(
"Couldn't create cylinder\n");
3465 skip(
"Couldn't create mesh\n");
3472 sprintf(
name,
"cylinder (%g, %g, %g, %u, %u)", radius1, radius2,
length, slices, stacks);
3495 skip(
"Couldn't create test context\n");
3504 ok(
hr ==
D3D_OK,
"Got result %lx, expected 0 (D3D_OK)\n",
hr);
3515 ok(
hr ==
D3D_OK,
"Got result %lx, expected 0 (D3D_OK)\n",
hr);
3527 ok(
hr ==
D3D_OK,
"Got result %lx, expected 0 (D3D_OK)\n",
hr);
3555 float phi, phi_step, sin_phi, cos_phi;
3556 float theta, theta_step, sin_theta, cos_theta;
3557 unsigned int numvert, numfaces,
i,
j;
3559 numvert = sides * rings;
3560 numfaces = numvert * 2;
3565 phi_step =
D3DX_PI / sides * 2.0f;
3566 theta_step =
D3DX_PI / rings * -2.0f;
3570 for (
i = 0;
i < rings; ++
i)
3574 cos_theta =
cosf(theta);
3575 sin_theta =
sinf(theta);
3577 for (
j = 0;
j < sides; ++
j)
3579 sin_phi =
sinf(phi);
3580 cos_phi =
cosf(phi);
3582 mesh->
vertices[
i * sides +
j].position.x = (innerradius * cos_phi + outerradius) * cos_theta;
3583 mesh->
vertices[
i * sides +
j].position.y = (innerradius * cos_phi + outerradius) * sin_theta;
3584 mesh->
vertices[
i * sides +
j].position.z = innerradius * sin_phi;
3592 theta += theta_step;
3595 for (
i = 0;
i < numfaces - sides * 2; ++
i)
3598 mesh->
faces[
i][1] = (
i / 2 + 1) % sides ?
i / 2 + 1 :
i / 2 + 1 - sides;
3599 mesh->
faces[
i][2] = (
i + 1) % (sides * 2) ? (
i + 1) / 2 + sides : (
i + 1) / 2;
3602 for (
j = 0;
i < numfaces; ++
i, ++
j)
3605 mesh->
faces[
i][1] = (
i / 2 + 1) % sides ?
i / 2 + 1 :
i / 2 + 1 - sides;
3606 mesh->
faces[
i][2] =
i == numfaces - 1 ? 0 : (
j + 1) / 2;
3620 ok(
hr ==
D3D_OK,
"Got result %#lx, expected 0 (D3D_OK)\n",
hr);
3623 skip(
"Couldn't create torus\n");
3629 skip(
"Couldn't create mesh\n");
3630 torus->lpVtbl->Release(torus);
3636 sprintf(
name,
"torus (%g, %g, %u, %u)", innerradius, outerradius, sides, rings);
3641 torus->lpVtbl->Release(torus);
3648 ID3DXMesh* torus =
NULL;
3653 skip(
"Couldn't create test context\n");
3735 new_buffer =
realloc(
array->items, new_capacity * itemsize);
3738 new_buffer =
malloc(new_capacity * itemsize);
3742 array->items = new_buffer;
3743 array->capacity = new_capacity;
3786 float max_deviation)
3791 D3DXVec2Scale(&split1, D3DXVec2Add(&split1, p1, p2), 0.5f);
3792 D3DXVec2Scale(&split2, D3DXVec2Add(&split2, p2, p3), 0.5f);
3793 D3DXVec2Scale(&middle, D3DXVec2Add(&middle, &split1, &split2), 0.5f);
3795 deviation = D3DXVec2Length(D3DXVec2Subtract(&
vec, &middle, p2));
3796 if (deviation < max_deviation) {
3817 return D3DXVec2Dot(dir1, dir2) > cos_theta;
3870 float max_deviation,
float emsquare)
3896 trace(
"Unknown header type %ld\n",
header->dwType);
3922 D3DXVec2Scale(&bezier_end, D3DXVec2Add(&bezier_end, &pt_flt[
j], &pt_flt[
j+1]), 0.5f);
3926 bezier_start = bezier_end;
3938 pt->pos = pt_flt[
j];
3941 for (
j = 0;
j < curve->
cpfx;
j++)
3946 pt->pos = pt_flt[
j];
3960 if (
pt->pos.x == lastpt->
pos.
x &&
pt->pos.y == lastpt->
pos.
y) {
4032 float deviation,
float extrusion,
float otmEMSquare,
const struct glyphinfo *glyphs)
4034 DWORD nb_vertices, nb_faces;
4035 DWORD nb_corners, nb_outline_points;
4038 struct vertex *vertex_ptr;
4045 nb_outline_points = 0;
4046 for (
i = 0;
i < textlen;
i++)
4061 nb_vertices = (nb_outline_points + nb_corners) * 2 + textlen;
4062 nb_faces = nb_outline_points * 2;
4064 ok(
new_mesh(
mesh, nb_vertices, nb_faces),
"Failed to create reference text mesh.\n");
4069 for (
i = 0;
i < textlen;
i++)
4076 struct vertex *outline_vertices = vertex_ptr;
4090 D3DXVec2Subtract(&
vec, &
pt->pos, &prevpt->
pos);
4091 else if (
pt->corner)
4092 D3DXVec2Subtract(&
vec, &nextpt->
pos, &
pt->pos);
4094 D3DXVec2Subtract(&
vec, &nextpt->
pos, &prevpt->
pos);
4103 *vertex_ptr++ = vtx;
4106 *vertex_ptr++ = vtx;
4112 *vertex_ptr++ = vtx;
4114 *vertex_ptr++ = vtx;
4116 (*face_ptr)[0] = vtx_idx;
4117 (*face_ptr)[1] = vtx_idx + 2;
4118 (*face_ptr)[2] = vtx_idx + 1;
4121 (*face_ptr)[0] = vtx_idx;
4122 (*face_ptr)[1] = vtx_idx + 3;
4123 (*face_ptr)[2] = vtx_idx + 2;
4129 D3DXVec2Subtract(&
vec, &nextpt2->
pos, &nextpt->
pos);
4131 D3DXVec2Subtract(&
vec, &nextpt->
pos, &
pt->pos);
4138 *vertex_ptr++ = vtx;
4140 *vertex_ptr++ = vtx;
4143 (*face_ptr)[0] = vtx_idx;
4144 (*face_ptr)[1] = vtx_idx + 3;
4145 (*face_ptr)[2] = vtx_idx + 1;
4148 (*face_ptr)[0] = vtx_idx;
4149 (*face_ptr)[1] = vtx_idx + 2;
4150 (*face_ptr)[2] = vtx_idx + 3;
4158 *vertex_ptr++ = *outline_vertices++;
4159 *vertex_ptr++ = *outline_vertices++;
4176 size_t textlen,
float extrusion,
const struct glyphinfo *glyphs)
4179 DWORD number_of_vertices, number_of_faces;
4181 IDirect3DIndexBuffer9 *index_buffer =
NULL;
4187 int vtx_idx1, face_idx1, vtx_idx2, face_idx2;
4189 number_of_vertices = d3dxmesh->lpVtbl->GetNumVertices(d3dxmesh);
4190 number_of_faces = d3dxmesh->lpVtbl->GetNumFaces(d3dxmesh);
4199 name, vertex_buffer_description.
Type);
4200 ok(!vertex_buffer_description.
Usage,
"Test %s, unexpected usage %#lx.\n",
name, vertex_buffer_description.
Usage);
4202 name, vertex_buffer_description.
Pool);
4203 ok(vertex_buffer_description.
FVF ==
mesh->
fvf,
"Test %s, unexpected FVF %#lx (expected %#lx).\n",
4209 ok(vertex_buffer_description.
Size ==
expected,
"Test %s, unexpected size %u (expected %u).\n",
4212 hr = d3dxmesh->lpVtbl->GetIndexBuffer(d3dxmesh, &index_buffer);
4219 name, index_buffer_description.
Type);
4220 ok(!index_buffer_description.
Usage,
"Test %s, unexpected usage %#lx.\n",
4223 name, index_buffer_description.
Pool);
4225 ok(index_buffer_description.
Size ==
expected,
"Test %s, unexpected size %u.\n",
4226 name, index_buffer_description.
Size);
4238 for (
i = 0;
i < textlen;
i++)
4240 int nb_outline_vertices1, nb_outline_faces1;
4241 int nb_outline_vertices2, nb_outline_faces2;
4242 int nb_back_vertices, nb_back_faces;
4243 int first_vtx1, first_vtx2;
4244 int first_face1, first_face2;
4247 first_vtx1 = vtx_idx1;
4248 first_vtx2 = vtx_idx2;
4250 if (glyphs[
i].outlines.count > 0)
4252 for (; vtx_idx1 < number_of_vertices; vtx_idx1++)
4254 if (vertices[vtx_idx1].
normal.z != 0)
4264 nb_outline_vertices1 = vtx_idx1 - first_vtx1;
4265 nb_outline_vertices2 = vtx_idx2 - first_vtx2;
4266 ok(nb_outline_vertices1 == nb_outline_vertices2,
4267 "Test %s, glyph %d, outline vertex count result %d, expected %d\n",
name,
i,
4268 nb_outline_vertices1, nb_outline_vertices2);
4270 for (
j = 0;
j <
min(nb_outline_vertices1, nb_outline_vertices2);
j++)
4272 vtx_idx1 = first_vtx1 +
j;
4273 vtx_idx2 = first_vtx2 +
j;
4275 "Test %s, glyph %d, vertex position %d, result (%g, %g, %g), expected (%g, %g, %g)\n",
name,
i, vtx_idx1,
4279 "Test %s, glyph %d, vertex normal %d, result (%g, %g, %g), expected (%g, %g, %g)\n",
name,
i, vtx_idx1,
4283 vtx_idx1 = first_vtx1 + nb_outline_vertices1;
4284 vtx_idx2 = first_vtx2 + nb_outline_vertices2;
4286 first_face1 = face_idx1;
4287 first_face2 = face_idx2;
4288 for (; face_idx1 < number_of_faces; face_idx1++)
4290 if (faces[face_idx1][0] >= vtx_idx1 ||
4291 faces[face_idx1][1] >= vtx_idx1 ||
4292 faces[face_idx1][2] >= vtx_idx1)
4297 if (
mesh->
faces[face_idx2][0] >= vtx_idx2 ||
4298 mesh->
faces[face_idx2][1] >= vtx_idx2 ||
4302 nb_outline_faces1 = face_idx1 - first_face1;
4303 nb_outline_faces2 = face_idx2 - first_face2;
4304 ok(nb_outline_faces1 == nb_outline_faces2,
4305 "Test %s, glyph %d, outline face count result %d, expected %d\n",
name,
i,
4306 nb_outline_faces1, nb_outline_faces2);
4308 for (
j = 0;
j <
min(nb_outline_faces1, nb_outline_faces2);
j++)
4310 face_idx1 = first_face1 +
j;
4311 face_idx2 = first_face2 +
j;
4312 ok(faces[face_idx1][0] - first_vtx1 ==
mesh->
faces[face_idx2][0] - first_vtx2 &&
4313 faces[face_idx1][1] - first_vtx1 ==
mesh->
faces[face_idx2][1] - first_vtx2 &&
4314 faces[face_idx1][2] - first_vtx1 ==
mesh->
faces[face_idx2][2] - first_vtx2,
4315 "Test %s, glyph %d, face %d, result (%d, %d, %d), expected (%d, %d, %d)\n",
name,
i, face_idx1,
4316 faces[face_idx1][0], faces[face_idx1][1], faces[face_idx1][2],
4317 mesh->
faces[face_idx2][0] - first_vtx2 + first_vtx1,
4318 mesh->
faces[face_idx2][1] - first_vtx2 + first_vtx1,
4319 mesh->
faces[face_idx2][2] - first_vtx2 + first_vtx1);
4321 face_idx1 = first_face1 + nb_outline_faces1;
4322 face_idx2 = first_face2 + nb_outline_faces2;
4325 first_vtx1 = vtx_idx1;
4326 for (; vtx_idx1 < number_of_vertices; vtx_idx1++) {
4329 if (vertices[vtx_idx1].
normal.z != 1.0f)
4337 "Test %s, glyph %d, vertex position.z %d, result %g, expected %g\n",
name,
i, vtx_idx1,
4340 "Test %s, glyph %d, vertex normal %d, result (%g, %g, %g), expected (%g, %g, %g)\n",
name,
i, vtx_idx1,
4344 nb_back_vertices = vtx_idx1 - first_vtx1;
4345 first_face1 = face_idx1;
4346 for (; face_idx1 < number_of_faces; face_idx1++)
4354 if (faces[face_idx1][0] >= vtx_idx1 ||
4355 faces[face_idx1][1] >= vtx_idx1 ||
4356 faces[face_idx1][2] >= vtx_idx1)
4359 vtx1 = &vertices[faces[face_idx1][0]].
position;
4360 vtx2 = &vertices[faces[face_idx1][1]].
position;
4361 vtx3 = &vertices[faces[face_idx1][2]].
position;
4363 D3DXVec3Subtract(&
v1, vtx2, vtx1);
4364 D3DXVec3Subtract(&
v2, vtx3, vtx2);
4368 "Test %s, glyph %d, face %d normal, result (%g, %g, %g), expected (%g, %g, %g)\n",
name,
i, face_idx1,
4371 nb_back_faces = face_idx1 - first_face1;
4374 if (extrusion == 0.0f) {
4376 nb_back_vertices /= 2;
4378 face_idx1 -= nb_back_faces;
4379 vtx_idx1 -= nb_back_vertices;
4381 for (
j = 0;
j < nb_back_vertices;
j++)
4383 struct vertex vtx = vertices[first_vtx1];
4387 vtx.
normal.
z = extrusion == 0.0f ? 1.0f : -1.0f;
4389 "Test %s, glyph %d, vertex position %d, result (%g, %g, %g), expected (%g, %g, %g)\n",
name,
i, vtx_idx1,
4393 "Test %s, glyph %d, vertex normal %d, result (%g, %g, %g), expected (%g, %g, %g)\n",
name,
i, vtx_idx1,
4399 for (
j = 0;
j < nb_back_faces;
j++)
4402 if (extrusion == 0.0f) {
4409 ok(faces[face_idx1][0] == faces[first_face1][0] + nb_back_vertices &&
4410 faces[face_idx1][1] == faces[first_face1][
f1] + nb_back_vertices &&
4411 faces[face_idx1][2] == faces[first_face1][
f2] + nb_back_vertices,
4412 "Test %s, glyph %d, face %d, result (%d, %d, %d), expected (%d, %d, %d)\n",
name,
i, face_idx1,
4413 faces[face_idx1][0], faces[face_idx1][1], faces[face_idx1][2],
4414 faces[first_face1][0] - nb_back_faces,
4415 faces[first_face1][
f1] - nb_back_faces,
4416 faces[first_face1][
f2] - nb_back_faces);
4428 if (
mesh->
faces[face_idx2][0] >= vtx_idx2 ||
4429 mesh->
faces[face_idx2][1] >= vtx_idx2 ||
4430 mesh->
faces[face_idx2][2] >= vtx_idx2)
break;
4442 static const MAT2 identity = {{0, 1}, {0, 0}, {0, 0}, {0, 1}};
4444 ID3DXMesh *d3dxmesh =
NULL;
4461 ok(
hr ==
D3D_OK,
"Got result %lx, expected 0 (D3D_OK)\n",
hr);
4472 glyphs =
calloc(textlen,
sizeof(*glyphs));
4475 for (
i = 0;
i < textlen;
i++)
4486 if (deviation == 0.0f)
4490 for (
i = 0;
i < textlen;
i++)
4515 d3dxmesh->lpVtbl->Release(d3dxmesh);
4517 free(glyphmetrics_float);
4519 for (
i = 0;
i < textlen;
i++)
4529 ID3DXMesh* d3dxmesh =
NULL;
4532 int number_of_vertices;
4533 int number_of_faces;
4538 skip(
"Couldn't create test context\n");
4545 hFont =
CreateFontA(12, 0, 0, 0,
FW_NORMAL,
FALSE,
FALSE,
FALSE,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,
4579 number_of_vertices = d3dxmesh->lpVtbl->GetNumVertices(d3dxmesh);
4580 number_of_faces = d3dxmesh->lpVtbl->GetNumFaces(d3dxmesh);
4581 d3dxmesh->lpVtbl->Release(d3dxmesh);
4585 ok(number_of_vertices == d3dxmesh->lpVtbl->GetNumVertices(d3dxmesh),
4586 "Got %ld vertices, expected %d\n",
4587 d3dxmesh->lpVtbl->GetNumVertices(d3dxmesh), number_of_vertices);
4588 ok(number_of_faces == d3dxmesh->lpVtbl->GetNumFaces(d3dxmesh),
4589 "Got %ld faces, expected %d\n",
4590 d3dxmesh->lpVtbl->GetNumVertices(d3dxmesh), number_of_faces);
4591 d3dxmesh->lpVtbl->Release(d3dxmesh);
4596 trace(
"Waiting for D3DXCreateText to finish with deviation = FLT_MIN ...\n");
4599 if (
SUCCEEDED(
hr) && d3dxmesh) d3dxmesh->lpVtbl->Release(d3dxmesh);
4600 trace(
"D3DXCreateText finish with deviation = FLT_MIN\n");
4605 if (
SUCCEEDED(
hr) && d3dxmesh) d3dxmesh->lpVtbl->Release(d3dxmesh);
4666 ok(
size == 15,
"Got size %u, expected 15.\n",
size);
4669 ok(
size == 16,
"Got size %u, expected 16.\n",
size);
4713 static const UINT sizes1[] =
4720 static const UINT sizes2[] =
4729 ok(
size == 0,
"Got size %#x, expected 0.\n",
size);
4731 for (
i = 0;
i < 16; ++
i)
4734 ok(
size == sizes1[
i],
"Got size %u for stream %u, expected %u.\n",
size,
i, sizes1[
i]);
4737 for (
i = 0;
i < 8; ++
i)
4740 ok(
size == sizes2[
i],
"Got size %u for stream %u, expected %u.\n",
size,
i, sizes2[
i]);
4748 ID3DXMesh *d3dxmesh =
NULL;
4758 DWORD adjacency[3 * 3];
4761 4, {{0.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, {1.0, 1.0, 0.0}, {0.0, 1.0, 0.0}},
4762 2, {0, 1, 2, 0, 2, 3},
4764 {-1, -1, 1, 0, -1, -1},
4767 6, {{0.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, {1.0, 1.0, 0.0}, {0.0, 0.0, 0.0}, {1.0, 1.0, 0.0}, {0.0, 1.0, 0.0}},
4768 2, {0, 1, 2, 3, 4, 5},
4770 {-1, -1, -1, -1, -1, -1},
4773 6, {{0.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, {1.0, 1.0, 0.0}, {0.0, 0.0, 0.0}, {1.0, 1.0, 0.0}, {0.0, 1.0, 0.0}},
4774 2, {0, 1, 2, 3, 4, 5},
4776 {-1, -1, 1, 0, -1, -1},
4779 6, {{0.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, {1.0, 1.0, 0.0}, {0.0, 0.0, 0.25}, {1.0, 1.0, 0.25}, {0.0, 1.0, 0.25}},
4780 2, {0, 1, 2, 3, 4, 5},
4782 {-1, -1, -1, -1, -1, -1},
4785 6, {{0.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, {1.0, 1.0, 0.0}, {0.0, 0.0, 0.25}, {1.0, 1.0, 0.25}, {0.0, 1.0, 0.25}},
4786 2, {0, 1, 2, 3, 4, 5},
4788 {-1, -1, 1, 0, -1, -1},
4791 6, {{0.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, {1.0, 1.0, 0.0}, {0.0, 0.25, 0.25}, {1.0, 1.25, 0.25}, {0.0, 1.25, 0.25}},
4792 2, {0, 1, 2, 3, 4, 5},
4794 {-1, -1, -1, -1, -1, -1},
4797 6, {{0.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, {1.0, 1.0, 0.0}, {0.0, 0.25, 0.25}, {1.0, 1.25, 0.25}, {0.0, 1.25, 0.25}},
4798 2, {0, 1, 2, 3, 4, 5},
4800 {-1, -1, 1, 0, -1, -1},
4803 4, {{0.0, 0.0, 0.0}, {1.0, 0.0, 0.0}, {1.0, 1.0, 0.0}, {0.0, 1.0, 0.0}},
4804 2, {0, 1, 2, 0, 3, 2},
4806 {-1, -1, -1, -1, -1, -1},
4813 skip(
"Couldn't create test context\n");
4823 if (d3dxmesh) d3dxmesh->lpVtbl->
Release(d3dxmesh);
4829 hr = d3dxmesh->lpVtbl->LockVertexBuffer(d3dxmesh,
D3DLOCK_DISCARD, (
void**)&vertices);
4833 d3dxmesh->lpVtbl->UnlockVertexBuffer(d3dxmesh);
4839 d3dxmesh->lpVtbl->UnlockIndexBuffer(d3dxmesh);
4842 hr = d3dxmesh->lpVtbl->GenerateAdjacency(d3dxmesh, 0.0f,
NULL);
4846 hr = d3dxmesh->lpVtbl->GenerateAdjacency(d3dxmesh,
test_data[
i].epsilon, adjacency);
4852 "Test %d adjacency %d: Got result %lu, expected %lu\n",
i,
j,
4855 if (d3dxmesh) d3dxmesh->lpVtbl->Release(d3dxmesh);
4933 { { 0.0f, 1.0f, 0.f}, { 1.0f, 0.0f, 0.f}, {0.0f, 0.0f, 1.0f}, 0xffff0000 },
4934 { { 1.0f, -1.0f, 0.f}, {-1.0f, -1.0f, 0.f}, {0.0f, 0.0f, 1.0f}, 0xff00ff00 },
4935 { {-1.0f, -1.0f, 0.f}, {-1.0f, 1.0f, 0.f}, {0.0f, 0.0f, 1.0f}, 0xff0000ff },
4937 unsigned int faces[] = {0, 1, 2};
4939 unsigned int num_faces =
ARRAY_SIZE(faces) / 3;
4940 unsigned int num_vertices =
ARRAY_SIZE(vertices);
4945 DWORD *attributes_buffer;
4948 DWORD exp_vertex_size =
sizeof(*vertices);
4949 DWORD vertex_size = 0;
4957 skip(
"Couldn't create a test_context\n");
4965 skip(
"Couldn't create test mesh %#lx\n",
hr);
4971 mesh->lpVtbl->UnlockVertexBuffer(
mesh);
4973 mesh->lpVtbl->LockIndexBuffer(
mesh, 0, &index_buffer);
4974 memcpy(index_buffer, faces,
sizeof(faces));
4975 mesh->lpVtbl->UnlockIndexBuffer(
mesh);
4977 mesh->lpVtbl->LockAttributeBuffer(
mesh, 0, &attributes_buffer);
4979 mesh->lpVtbl->UnlockAttributeBuffer(
mesh);
4985 skip(
"Couldn't get vertex declaration %#lx\n",
hr);
4989 ok(
equal == 0,
"Vertex declarations were not equal\n");
5008 skip(
"Couldn't get vertex declaration %#lx\n",
hr);
5016 ok(decl_ptr->
Offset ==
offset,
"Test UpdateSemantics, got offset %d expected %d\n",
5028 "got %#lx expected D3D_OK\n",
hr);
5031 ok(
hr ==
D3D_OK,
"Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n",
hr);
5035 ok(decl_mem[
i] == 0xbb,
"Unexpected %#x.\n", decl_mem[
i]);
5045 skip(
"Couldn't get vertex declaration %#lx\n",
hr);
5058 ok(
hr ==
D3D_OK,
"Test UpdateSemantics for overlapping fields, "
5059 "got %#lx expected D3D_OK\n",
hr);
5062 hr =
mesh->lpVtbl->UpdateSemantics(
mesh, declaration_pos_type_color);
5063 ok(
hr ==
D3D_OK,
"Test UpdateSemantics position type color, "
5064 "got %#lx expected D3D_OK\n",
hr);
5074 mesh->lpVtbl->UpdateSemantics(
mesh, declaration0);
5077 "got %#lx expected D3DERR_INVALIDCALL\n",
hr);
5078 vertex_size =
mesh->lpVtbl->GetNumBytesPerVertex(
mesh);
5079 ok(vertex_size == exp_vertex_size,
"Got vertex declaration size %lu, expected %lu\n",
5080 vertex_size, exp_vertex_size);
5083 ok(
hr ==
D3D_OK,
"Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n",
hr);
5085 ok(
equal == 0,
"Vertex declarations were not equal\n");
5088 mesh->lpVtbl->UpdateSemantics(
mesh, declaration0);
5089 hr =
mesh->lpVtbl->UpdateSemantics(
mesh, declaration_smaller);
5091 "got %#lx expected D3DERR_INVALIDCALL\n",
hr);
5092 vertex_size =
mesh->lpVtbl->GetNumBytesPerVertex(
mesh);
5093 ok(vertex_size == exp_vertex_size,
"Got vertex declaration size %lu, expected %lu\n",
5094 vertex_size, exp_vertex_size);
5097 ok(
hr ==
D3D_OK,
"Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n",
hr);
5099 ok(
equal == 0,
"Vertex declarations were not equal\n");
5102 mesh->lpVtbl->UpdateSemantics(
mesh, declaration0);
5103 hr =
mesh->lpVtbl->UpdateSemantics(
mesh, declaration_larger);
5105 "got %#lx expected D3DERR_INVALIDCALL\n",
hr);
5106 vertex_size =
mesh->lpVtbl->GetNumBytesPerVertex(
mesh);
5107 ok(vertex_size == exp_vertex_size,
"Got vertex declaration size %lu, expected %lu\n",
5108 vertex_size, exp_vertex_size);
5111 ok(
hr ==
D3D_OK,
"Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n",
hr);
5113 ok(
equal == 0,
"Vertex declarations were not equal\n");
5116 mesh->lpVtbl->UpdateSemantics(
mesh, declaration0);
5117 hr =
mesh->lpVtbl->UpdateSemantics(
mesh, declaration_multiple_streams);
5119 "got %#lx expected D3DERR_INVALIDCALL\n",
hr);
5120 vertex_size =
mesh->lpVtbl->GetNumBytesPerVertex(
mesh);
5121 ok(vertex_size == exp_vertex_size,
"Got vertex declaration size %lu, expected %lu\n",
5122 vertex_size, exp_vertex_size);
5125 ok(
hr ==
D3D_OK,
"Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n",
hr);
5127 ok(
equal == 0,
"Vertex declarations were not equal\n");
5136 mesh->lpVtbl->UpdateSemantics(
mesh, declaration0);
5137 hr =
mesh->lpVtbl->UpdateSemantics(
mesh, declaration_double_usage);
5138 ok(
hr ==
D3D_OK,
"Test UpdateSemantics double usage, "
5139 "got %#lx expected D3D_OK\n",
hr);
5140 vertex_size =
mesh->lpVtbl->GetNumBytesPerVertex(
mesh);
5141 ok(vertex_size == exp_vertex_size,
"Got vertex declaration size %lu, expected %lu\n",
5142 vertex_size, exp_vertex_size);
5145 ok(
hr ==
D3D_OK,
"Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n",
hr);
5147 ok(
equal == 0,
"Vertex declarations were not equal\n");
5150 mesh->lpVtbl->UpdateSemantics(
mesh, declaration0);
5151 hr =
mesh->lpVtbl->UpdateSemantics(
mesh, declaration_undefined_type);
5152 ok(
hr ==
D3D_OK,
"Test UpdateSemantics undefined type, "
5153 "got %#lx expected D3D_OK\n",
hr);
5154 vertex_size =
mesh->lpVtbl->GetNumBytesPerVertex(
mesh);
5155 ok(vertex_size == exp_vertex_size,
"Got vertex declaration size %lu, expected %lu\n",
5156 vertex_size, exp_vertex_size);
5159 ok(
hr ==
D3D_OK,
"Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n",
hr);
5161 ok(
equal == 0,
"Vertex declarations were not equal\n");
5164 mesh->lpVtbl->UpdateSemantics(
mesh, declaration0);
5165 hr =
mesh->lpVtbl->UpdateSemantics(
mesh, declaration_not_4_byte_aligned_offset);
5166 ok(
hr ==
D3D_OK,
"Test UpdateSemantics not 4 byte aligned offset, "
5167 "got %#lx expected D3D_OK\n",
hr);
5168 vertex_size =
mesh->lpVtbl->GetNumBytesPerVertex(
mesh);
5169 ok(vertex_size == exp_vertex_size,
"Got vertex declaration size %lu, expected %lu\n",
5170 vertex_size, exp_vertex_size);
5173 ok(
hr ==
D3D_OK,
"Couldn't get vertex declaration. Got %#lx, expected D3D_OK\n",
hr);
5175 sizeof(declaration_not_4_byte_aligned_offset));
5176 ok(
equal == 0,
"Vertex declarations were not equal\n");
5194 DWORD exp_vertices[2], vertices[2];
5195 float exp_weights[2],
weights[2];
5196 const char *exp_string, *
string;
5197 ID3DXSkinInfo *skininfo =
NULL;
5204 if (skininfo) IUnknown_Release(skininfo);
5217 ID3DXSkinInfo *clone =
NULL;
5220 const char *string_result;
5225 hr = skininfo->lpVtbl->GetDeclaration(skininfo, declaration_out);
5230 dword_result = skininfo->lpVtbl->GetNumBones(skininfo);
5231 ok(dword_result == 1,
"Expected 1, got %lu\n", dword_result);
5233 flt_result = skininfo->lpVtbl->GetMinBoneInfluence(skininfo);
5234 ok(flt_result == 0.0f,
"Expected 0.0, got %g\n", flt_result);
5236 string_result = skininfo->lpVtbl->GetBoneName(skininfo, 0);
5237 ok(string_result ==
NULL,
"Expected NULL, got %p\n", string_result);
5239 dword_result = skininfo->lpVtbl->GetFVF(skininfo);
5240 ok(dword_result == 0,
"Expected 0, got %lu\n", dword_result);
5242 dword_result = skininfo->lpVtbl->GetNumBoneInfluences(skininfo, 0);
5243 ok(dword_result == 0,
"Expected 0, got %lu\n", dword_result);
5245 dword_result = skininfo->lpVtbl->GetNumBoneInfluences(skininfo, 1);
5246 ok(dword_result == 0,
"Expected 0, got %lu\n", dword_result);
5248 transform = skininfo->lpVtbl->GetBoneOffsetMatrix(skininfo, -1);
5251 hr = skininfo->lpVtbl->Clone(skininfo, &clone);
5253 IUnknown_Release(clone);
5257 hr = skininfo->lpVtbl->SetBoneOffsetMatrix(skininfo, 1, &identity_matrix);
5260 hr = skininfo->lpVtbl->SetBoneOffsetMatrix(skininfo, 0,
NULL);
5263 D3DXMatrixIdentity(&identity_matrix);
5264 hr = skininfo->lpVtbl->SetBoneOffsetMatrix(skininfo, 0, &identity_matrix);
5267 transform = skininfo->lpVtbl->GetBoneOffsetMatrix(skininfo, 0);
5273 const char *name_in =
"testBoneName";
5274 const char *string_result2;
5276 hr = skininfo->lpVtbl->SetBoneName(skininfo, 1, name_in);
5279 hr = skininfo->lpVtbl->SetBoneName(skininfo, 0,
NULL);
5282 hr = skininfo->lpVtbl->SetBoneName(skininfo, 0, name_in);
5285 string_result = skininfo->lpVtbl->GetBoneName(skininfo, 0);
5286 ok(string_result !=
NULL,
"Expected non-NULL string, got %p\n", string_result);
5287 ok(!
strcmp(string_result, name_in),
"Expected '%s', got '%s'\n", name_in, string_result);
5289 string_result2 = skininfo->lpVtbl->GetBoneName(skininfo, 0);
5290 ok(string_result == string_result2,
"Expected %p, got %p\n", string_result, string_result2);
5292 string_result = skininfo->lpVtbl->GetBoneName(skininfo, 1);
5293 ok(string_result ==
NULL,
"Expected NULL, got %p\n", string_result);
5298 DWORD num_influences;
5301 vertices[0] = 0xdeadbeef;
5303 hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 0, vertices,
weights);
5305 ok(vertices[0] == 0xdeadbeef,
"expected 0xdeadbeef, got %#lx\n", vertices[0]);
5308 hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 1, vertices,
weights);
5311 hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 0,
NULL,
NULL);
5314 hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 0, vertices,
NULL);
5317 hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 0,
NULL,
weights);
5322 exp_vertices[0] = 0;
5323 exp_vertices[1] = 0x87654321;
5324 exp_weights[0] = 0.5;
5325 exp_weights[1] =
NAN;
5328 hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 1, num_influences, vertices,
weights);
5331 hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 0, num_influences,
NULL,
weights);
5334 hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 0, num_influences, vertices,
NULL);
5337 hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 0, num_influences,
NULL,
NULL);
5340 hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 0, num_influences, exp_vertices, exp_weights);
5343 memset(vertices, 0,
sizeof(vertices));
5345 hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 0, vertices,
weights);
5347 for (
i = 0;
i < num_influences;
i++) {
5348 ok(exp_vertices[
i] == vertices[
i],
5349 "influence[%d]: expected vertex %lu, got %lu\n",
i, exp_vertices[
i], vertices[
i]);
5351 "influence[%d]: expected weights %g, got %g\n",
i, exp_weights[
i],
weights[
i]);
5355 memset(vertices, 0,
sizeof(vertices));
5357 hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 0, 0, vertices,
weights);
5360 vertices[0] = 0xdeadbeef;
5362 hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 0, vertices,
weights);
5364 ok(vertices[0] == 0xdeadbeef,
"expected vertex 0xdeadbeef, got %lu\n", vertices[0]);
5367 hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 0, num_influences, exp_vertices, exp_weights);
5377 hr = skininfo->lpVtbl->SetDeclaration(skininfo,
NULL);
5380 hr = skininfo->lpVtbl->SetDeclaration(skininfo, declaration_with_nonzero_stream);
5383 hr = skininfo->lpVtbl->SetFVF(skininfo, 0);
5388 hr = skininfo->lpVtbl->SetDeclaration(skininfo, declaration_in);
5390 got_fvf = skininfo->lpVtbl->GetFVF(skininfo);
5391 ok(fvf == got_fvf,
"Expected %#lx, got %#lx\n", fvf, got_fvf);
5392 hr = skininfo->lpVtbl->GetDeclaration(skininfo, declaration_out);
5396 hr = skininfo->lpVtbl->SetDeclaration(skininfo, empty_declaration);
5398 got_fvf = skininfo->lpVtbl->GetFVF(skininfo);
5399 ok(got_fvf == 0,
"Expected 0, got %#lx\n", got_fvf);
5400 hr = skininfo->lpVtbl->GetDeclaration(skininfo, declaration_out);
5404 hr = skininfo->lpVtbl->SetFVF(skininfo, fvf);
5406 got_fvf = skininfo->lpVtbl->GetFVF(skininfo);
5407 ok(fvf == got_fvf,
"Expected %#lx, got %#lx\n", fvf, got_fvf);
5408 hr = skininfo->lpVtbl->GetDeclaration(skininfo, declaration_out);
5414 hr = skininfo->lpVtbl->Clone(skininfo,
NULL);
5418 hr = skininfo->lpVtbl->Clone(skininfo, &clone);
5427 fvf = clone->lpVtbl->GetFVF(clone);
5428 ok(fvf == exp_fvf,
"Got unexpected fvf %#lx.\n", fvf);
5430 exp_string = skininfo->lpVtbl->GetBoneName(skininfo, 0);
5431 string = clone->lpVtbl->GetBoneName(clone, 0);
5432 ok(!
strcmp(
string, exp_string),
"Got unexpected bone 0 name %s.\n",
debugstr_a(
string));
5434 transform = clone->lpVtbl->GetBoneOffsetMatrix(clone, 0);
5437 hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 0, exp_vertices, exp_weights);
5439 hr = clone->lpVtbl->GetBoneInfluence(clone, 0, vertices,
weights);
5444 ok(vertices[
i] == exp_vertices[
i],
"influence[%u]: got unexpected vertex %lu, expected %lu.\n",
5445 i, vertices[
i], exp_vertices[
i]);
5447 "influence[%u]: got unexpected weight %.8e, expected %.8e.\n",
i,
weights[
i], exp_weights[
i]);
5450 IUnknown_Release(clone);
5452 if (skininfo) IUnknown_Release(skininfo);
5475 const unsigned int VERTS_PER_FACE = 3;
5478 DWORD *attributes_buffer;
5495 const struct vertex_pnc vertices0[] =
5497 {{ 0.0f, 3.0f, 0.f},
up,
RED},
5498 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
5499 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
5501 const DWORD indices0[] = {0, 1, 2};
5502 const unsigned int num_vertices0 =
ARRAY_SIZE(vertices0);
5503 const unsigned int num_faces0 =
ARRAY_SIZE(indices0) / VERTS_PER_FACE;
5504 const DWORD adjacency0[] = {-1, -1, -1};
5505 const DWORD exp_point_rep0[] = {0, 1, 2};
5513 const struct vertex_pnc vertices1[] =
5515 {{ 0.0f, 3.0f, 0.f},
up,
RED},
5516 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
5517 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
5519 {{ 3.0f, 3.0f, 0.f},
up,
GREEN},
5520 {{ 3.0f, 0.0f, 0.f},
up,
RED},
5521 {{ 1.0f, 0.0f, 0.f},
up,
BLUE},
5523 const DWORD indices1[] = {0, 1, 2, 3, 4, 5};
5524 const unsigned int num_vertices1 =
ARRAY_SIZE(vertices1);
5525 const unsigned int num_faces1 =
ARRAY_SIZE(indices1) / VERTS_PER_FACE;
5526 const DWORD adjacency1[] = {-1, 1, -1, -1, -1, 0};
5527 const DWORD exp_point_rep1[] = {0, 1, 2, 1, 4, 2};
5535 const struct vertex_pnc vertices2[] =
5537 {{ 0.0f, 3.0f, 0.f},
up,
RED},
5538 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
5539 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
5541 {{-1.0f, 3.0f, 0.f},
up,
RED},
5542 {{-1.0f, 0.0f, 0.f},
up,
GREEN},
5543 {{-3.0f, 0.0f, 0.f},
up,
BLUE},
5545 const DWORD indices2[] = {0, 1, 2, 3, 4, 5};
5546 const unsigned int num_vertices2 =
ARRAY_SIZE(vertices2);
5547 const unsigned int num_faces2 =
ARRAY_SIZE(indices2) / VERTS_PER_FACE;
5548 const DWORD adjacency2[] = {-1, -1, 1, 0, -1, -1};
5549 const DWORD exp_point_rep2[] = {0, 1, 2, 0, 2, 5};
5561 struct vertex_pnc vertices3[] =
5563 {{ 0.0f, 3.0f, 0.f},
up,
RED},
5564 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
5565 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
5567 {{ 2.0f, 7.0f, 0.f},
up,
BLUE},
5568 {{ 2.0f, 4.0f, 0.f},
up,
GREEN},
5569 {{ 0.0f, 4.0f, 0.f},
up,
RED},
5571 const DWORD indices3[] = {0, 1, 2, 3, 4, 5};
5572 const unsigned int num_vertices3 =
ARRAY_SIZE(vertices3);
5573 const unsigned int num_faces3 =
ARRAY_SIZE(indices3) / VERTS_PER_FACE;
5574 const DWORD adjacency3[] = {1, -1, -1, -1, 0, -1};
5575 const DWORD exp_point_rep3[] = {0, 1, 2, 3, 1, 0};
5587 struct vertex_pnc vertices4[] =
5589 {{ 0.0f, 3.0f, 0.f},
up,
RED},
5590 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
5591 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
5593 {{ 0.0f, -4.0f, 0.f},
up,
BLUE},
5594 {{ 2.0f, -7.0f, 0.f},
up,
GREEN},
5595 {{ 0.0f, -7.0f, 0.f},
up,
RED},
5597 const DWORD indices4[] = {0, 1, 2, 3, 4, 5};
5598 const unsigned int num_vertices4 =
ARRAY_SIZE(vertices4);
5599 const unsigned int num_faces4 =
ARRAY_SIZE(indices4) / VERTS_PER_FACE;
5600 const DWORD adjacency4[] = {-1, -1, -1, -1, -1, -1};
5601 const DWORD exp_point_rep4[] = {0, 1, 2, 3, 4, 5};
5614 const struct vertex_pnc vertices5[] =
5616 {{ 0.0f, 1.0f, 0.f},
up,
RED},
5617 {{ 1.0f, -1.0f, 0.f},
up,
GREEN},
5618 {{-1.0f, -1.0f, 0.f},
up,
BLUE},
5620 {{ 0.1f, 1.0f, 0.f},
up,
RED},
5621 {{ 2.1f, 1.0f, 0.f},
up,
BLUE},
5622 {{ 1.1f, -1.0f, 0.f},
up,
GREEN},
5624 {{-1.0f, -1.1f, 0.f},
up,
BLUE},
5625 {{ 1.0f, -1.1f, 0.f},
up,
GREEN},
5626 {{ 0.0f, -3.1f, 0.f},
up,
RED},
5628 {{ 1.1f, -1.1f, 0.f},
up,
GREEN},
5629 {{ 2.1f, -3.1f, 0.f},
up,
BLUE},
5630 {{ 0.1f, -3.1f, 0.f},
up,
RED},
5632 {{ 1.2f, -1.1f, 0.f},
up,
GREEN},
5633 {{ 3.2f, -1.1f, 0.f},
up,
RED},
5634 {{ 2.2f, -3.1f, 0.f},
up,
BLUE},
5636 {{ 2.2f, 1.0f, 0.f},
up,
BLUE},
5637 {{ 3.2f, -1.0f, 0.f},
up,
RED},
5638 {{ 1.2f, -1.0f, 0.f},
up,
GREEN},
5640 const DWORD indices5[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
5641 const unsigned int num_vertices5 =
ARRAY_SIZE(vertices5);
5642 const unsigned int num_faces5 =
ARRAY_SIZE(indices5) / VERTS_PER_FACE;
5643 const DWORD adjacency5[] = {-1, 2, -1, -1, 5, -1, 0, -1, -1, 4, -1, -1, 5, -1, 3, -1, 4, 1};
5644 const DWORD exp_point_rep5[] = {0, 1, 2, 3, 4, 5, 2, 1, 8, 5, 10, 11, 5, 13, 10, 4, 13, 5};
5645 const WORD indices5_16bit[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
5653 const struct vertex_pnc vertices6[] =
5655 {{ 0.0f, 3.0f, 0.f},
up,
RED},
5656 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
5657 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
5659 {{ 3.0f, 3.0f, 0.f},
up,
GREEN},
5660 {{ 3.0f, 0.0f, 0.f},
up,
RED},
5661 {{ 1.0f, 0.0f, 0.f},
up,
BLUE},
5663 {{ 4.0f, 3.0f, 0.f},
up,
GREEN},
5664 {{ 6.0f, 0.0f, 0.f},
up,
BLUE},
5665 {{ 4.0f, 0.0f, 0.f},
up,
RED},
5667 const DWORD indices6[] = {0, 1, 2, 6, 7, 8, 3, 4, 5};
5668 const unsigned int num_vertices6 =
ARRAY_SIZE(vertices6);
5669 const unsigned int num_faces6 =
ARRAY_SIZE(indices6) / VERTS_PER_FACE;
5670 const DWORD adjacency6[] = {-1, 1, -1, 2, -1, 0, -1, -1, 1};
5671 const DWORD exp_point_rep6[] = {0, 1, 2, 1, 4, 5, 1, 5, 2};
5679 const struct vertex_pnc vertices7[] =
5681 {{ 0.0f, 3.0f, 0.f},
up,
RED},
5682 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
5683 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
5685 {{ 3.0f, 3.0f, 0.f},
up,
GREEN},
5686 {{ 3.0f, 0.0f, 0.f},
up,
RED},
5687 {{ 1.0f, 0.0f, 0.f},
up,
BLUE},
5689 const DWORD indices7[] = {0, 1, 2, 3, 3, 3};
5690 const unsigned int num_vertices7 =
ARRAY_SIZE(vertices7);
5691 const unsigned int num_faces7 =
ARRAY_SIZE(indices7) / VERTS_PER_FACE;
5692 const DWORD adjacency7[] = {-1, -1, -1, -1, -1, -1};
5693 const DWORD exp_point_rep7[] = {0, 1, 2, 3, 4, 5};
5705 const struct vertex_pnc vertices8[] =
5707 {{ 0.0f, 3.0f, 0.f},
up,
RED},
5708 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
5709 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
5711 {{ 4.0, -4.0, 0.f},
up,
RED},
5712 {{ 6.0, -4.0, 0.f},
up,
BLUE},
5713 {{ 4.0, -7.0, 0.f},
up,
GREEN},
5715 {{ 4.0f, 3.0f, 0.f},
up,
GREEN},
5716 {{ 6.0f, 0.0f, 0.f},
up,
BLUE},
5717 {{ 4.0f, 0.0f, 0.f},
up,
RED},
5719 {{ 3.0f, 3.0f, 0.f},
up,
GREEN},
5720 {{ 3.0f, 0.0f, 0.f},
up,
RED},
5721 {{ 1.0f, 0.0f, 0.f},
up,
BLUE},
5723 const DWORD indices8[] = {0, 1, 2, 9, 10, 11, 6, 7, 8, 3, 4, 5};
5724 const unsigned int num_vertices8 =
ARRAY_SIZE(vertices8);
5725 const unsigned int num_faces8 =
ARRAY_SIZE(indices8) / VERTS_PER_FACE;
5726 const DWORD adjacency8[] = {-1, 1, -1, 2, -1, 0, -1, 3, 1, 2, -1, -1};
5727 const DWORD exp_point_rep8[] = {0, 1, 2, 3, 4, 5, 1, 4, 3, 1, 3, 2};
5735 const struct vertex_pnc vertices9[] =
5737 {{ 0.0f, 3.0f, 0.f},
up,
RED},
5738 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
5739 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
5741 {{ 2.0f, 0.0f, 0.f},
up,
RED},
5743 const DWORD indices9[] = {0, 1, 2, 1, 3, 2};
5744 const unsigned int num_vertices9 =
ARRAY_SIZE(vertices9);
5745 const unsigned int num_faces9 =
ARRAY_SIZE(indices9) / VERTS_PER_FACE;
5746 const DWORD adjacency9[] = {-1, 1, -1, -1, -1, 0};
5747 const DWORD exp_point_rep9[] = {0, 1, 2, 3};
5750 ID3DXMesh *mesh_null_check =
NULL;
5754 const struct vertex_pnc *vertices;
5756 const DWORD num_vertices;
5757 const DWORD num_faces;
5758 const DWORD *adjacency;
5759 const DWORD *exp_point_reps;
5856 (
DWORD*)indices5_16bit,
5869 skip(
"Couldn't create test context\n");
5879 skip(
"Couldn't create mesh %d. Got %lx expected D3D_OK\n",
i,
hr);
5884 mesh_null_check =
mesh;
5886 point_reps =
malloc(
tc[
i].num_vertices *
sizeof(*point_reps));
5889 skip(
"Couldn't allocate point reps array.\n");
5896 skip(
"Couldn't lock vertex buffer.\n");
5903 skip(
"Couldn't unlock vertex buffer.\n");
5907 hr =
mesh->lpVtbl->LockIndexBuffer(
mesh, 0, &index_buffer);
5910 skip(
"Couldn't lock index buffer.\n");
5923 skip(
"Couldn't unlock index buffer.\n");
5927 hr =
mesh->lpVtbl->LockAttributeBuffer(
mesh, 0, &attributes_buffer);
5930 skip(
"Couldn't lock attributes buffer.\n");
5934 hr =
mesh->lpVtbl->UnlockAttributeBuffer(
mesh);
5937 skip(
"Couldn't unlock attributes buffer.\n");
5942 for (
j = 0;
j <
tc[
i].num_vertices;
j++) point_reps[
j] = -1;
5943 hr =
mesh->lpVtbl->ConvertAdjacencyToPointReps(
mesh,
tc[
i].adjacency, point_reps);
5944 ok(
hr ==
D3D_OK,
"ConvertAdjacencyToPointReps failed case %d. "
5945 "Got %lx expected D3D_OK\n",
i,
hr);
5948 for (
j = 0;
j <
tc[
i].num_vertices;
j++)
5950 ok(point_reps[
j] ==
tc[
i].exp_point_reps[
j],
5951 "Unexpected point representation at (%d, %d)."
5952 " Got %ld expected %ld\n",
5953 i,
j, point_reps[
j],
tc[
i].exp_point_reps[
j]);
5964 hr = mesh_null_check->lpVtbl->ConvertAdjacencyToPointReps(mesh_null_check,
tc[0].adjacency,
NULL);
5966 "Got %lx expected D3DERR_INVALIDCALL\n",
hr);
5967 hr = mesh_null_check->lpVtbl->ConvertAdjacencyToPointReps(mesh_null_check,
NULL,
NULL);
5969 "Got %lx expected D3DERR_INVALIDCALL\n",
hr);
5972 if (mesh_null_check)
5973 mesh_null_check->lpVtbl->
Release(mesh_null_check);
5991 const unsigned int VERTS_PER_FACE = 3;
5994 DWORD *attributes_buffer;
6011 const struct vertex_pnc vertices0[] =
6013 {{ 0.0f, 3.0f, 0.f},
up,
RED},
6014 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
6015 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
6017 const DWORD indices0[] = {0, 1, 2};
6018 const unsigned int num_vertices0 =
ARRAY_SIZE(vertices0);
6019 const unsigned int num_faces0 = num_vertices0 / VERTS_PER_FACE;
6020 const DWORD exp_adjacency0[] = {-1, -1, -1};
6021 const DWORD exp_id_adjacency0[] = {-1, -1, -1};
6022 const DWORD point_rep0[] = {0, 1, 2};
6030 const struct vertex_pnc vertices1[] =
6032 {{ 0.0f, 3.0f, 0.f},
up,
RED},
6033 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
6034 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
6036 {{ 3.0f, 3.0f, 0.f},
up,
GREEN},
6037 {{ 3.0f, 0.0f, 0.f},
up,
RED},
6038 {{ 1.0f, 0.0f, 0.f},
up,
BLUE},
6040 const DWORD indices1[] = {0, 1, 2, 3, 4, 5};
6041 const unsigned int num_vertices1 =
ARRAY_SIZE(vertices1);
6042 const unsigned int num_faces1 = num_vertices1 / VERTS_PER_FACE;
6043 const DWORD exp_adjacency1[] = {-1, 1, -1, -1, -1, 0};
6044 const DWORD exp_id_adjacency1[] = {-1, -1, -1, -1, -1, -1};
6045 const DWORD point_rep1[] = {0, 1, 2, 1, 4, 2};
6053 const struct vertex_pnc vertices2[] =
6055 {{ 0.0f, 3.0f, 0.f},
up,
RED},
6056 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
6057 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
6059 {{-1.0f, 3.0f, 0.f},
up,
RED},
6060 {{-1.0f, 0.0f, 0.f},
up,
GREEN},
6061 {{-3.0f, 0.0f, 0.f},
up,
BLUE},
6063 const DWORD indices2[] = {0, 1, 2, 3, 4, 5};
6064 const unsigned int num_vertices2 =
ARRAY_SIZE(vertices2);
6065 const unsigned int num_faces2 = num_vertices2 / VERTS_PER_FACE;
6066 const DWORD exp_adjacency2[] = {-1, -1, 1, 0, -1, -1};
6067 const DWORD exp_id_adjacency2[] = {-1, -1, -1, -1, -1, -1};
6068 const DWORD point_rep2[] = {0, 1, 2, 0, 2, 5};
6080 struct vertex_pnc vertices3[] =
6082 {{ 0.0f, 3.0f, 0.f},
up,
RED},
6083 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
6084 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
6086 {{ 2.0f, 7.0f, 0.f},
up,
BLUE},
6087 {{ 2.0f, 4.0f, 0.f},
up,
GREEN},
6088 {{ 0.0f, 4.0f, 0.f},
up,
RED},
6090 const DWORD indices3[] = {0, 1, 2, 3, 4, 5};
6091 const unsigned int num_vertices3 =
ARRAY_SIZE(vertices3);
6092 const unsigned int num_faces3 = num_vertices3 / VERTS_PER_FACE;
6093 const DWORD exp_adjacency3[] = {1, -1, -1, -1, 0, -1};
6094 const DWORD exp_id_adjacency3[] = {-1, -1, -1, -1, -1, -1};
6095 const DWORD point_rep3[] = {0, 1, 2, 3, 1, 0};
6107 struct vertex_pnc vertices4[] =
6109 {{ 0.0f, 3.0f, 0.f},
up,
RED},
6110 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
6111 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
6113 {{ 0.0f, -4.0f, 0.f},
up,
BLUE},
6114 {{ 2.0f, -7.0f, 0.f},
up,
GREEN},
6115 {{ 0.0f, -7.0f, 0.f},
up,
RED},
6117 const DWORD indices4[] = {0, 1, 2, 3, 4, 5};
6118 const unsigned int num_vertices4 =
ARRAY_SIZE(vertices4);
6119 const unsigned int num_faces4 = num_vertices4 / VERTS_PER_FACE;
6120 const DWORD exp_adjacency4[] = {-1, -1, -1, -1, -1, -1};
6121 const DWORD exp_id_adjacency4[] = {-1, -1, -1, -1, -1, -1};
6122 const DWORD point_rep4[] = {0, 1, 2, 3, 4, 5};
6135 const struct vertex_pnc vertices5[] =
6137 {{ 0.0f, 1.0f, 0.f},
up,
RED},
6138 {{ 1.0f, -1.0f, 0.f},
up,
GREEN},
6139 {{-1.0f, -1.0f, 0.f},
up,
BLUE},
6141 {{ 0.1f, 1.0f, 0.f},
up,
RED},
6142 {{ 2.1f, 1.0f, 0.f},
up,
BLUE},
6143 {{ 1.1f, -1.0f, 0.f},
up,
GREEN},
6145 {{-1.0f, -1.1f, 0.f},
up,
BLUE},
6146 {{ 1.0f, -1.1f, 0.f},
up,
GREEN},
6147 {{ 0.0f, -3.1f, 0.f},
up,
RED},
6149 {{ 1.1f, -1.1f, 0.f},
up,
GREEN},
6150 {{ 2.1f, -3.1f, 0.f},
up,
BLUE},
6151 {{ 0.1f, -3.1f, 0.f},
up,
RED},
6153 {{ 1.2f, -1.1f, 0.f},
up,
GREEN},
6154 {{ 3.2f, -1.1f, 0.f},
up,
RED},
6155 {{ 2.2f, -3.1f, 0.f},
up,
BLUE},
6157 {{ 2.2f, 1.0f, 0.f},
up,
BLUE},
6158 {{ 3.2f, -1.0f, 0.f},
up,
RED},
6159 {{ 1.2f, -1.0f, 0.f},
up,
GREEN},
6161 const DWORD indices5[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
6162 const unsigned int num_vertices5 =
ARRAY_SIZE(vertices5);
6163 const unsigned int num_faces5 = num_vertices5 / VERTS_PER_FACE;
6164 const DWORD exp_adjacency5[] = {-1, 2, -1, -1, 5, -1, 0, -1, -1, 4, -1, -1, 5, -1, 3, -1, 4, 1};
6165 const DWORD exp_id_adjacency5[] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
6166 const DWORD point_rep5[] = {0, 1, 2, 3, 4, 5, 2, 1, 8, 5, 10, 11, 5, 13, 10, 4, 13, 5};
6174 const struct vertex_pnc vertices6[] =
6176 {{ 0.0f, 3.0f, 0.f},
up,
RED},
6177 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
6178 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
6180 {{ 3.0f, 3.0f, 0.f},
up,
GREEN},
6181 {{ 3.0f, 0.0f, 0.f},
up,
RED},
6182 {{ 1.0f, 0.0f, 0.f},
up,
BLUE},
6184 {{ 4.0f, 3.0f, 0.f},
up,
GREEN},
6185 {{ 6.0f, 0.0f, 0.f},
up,
BLUE},
6186 {{ 4.0f, 0.0f, 0.f},
up,
RED},
6188 const DWORD indices6[] = {0, 1, 2, 6, 7, 8, 3, 4, 5};
6189 const unsigned int num_vertices6 =
ARRAY_SIZE(vertices6);
6190 const unsigned int num_faces6 = num_vertices6 / VERTS_PER_FACE;
6191 const DWORD exp_adjacency6[] = {-1, 1, -1, 2, -1, 0, -1, -1, 1};
6192 const DWORD exp_id_adjacency6[] = {-1, -1, -1, -1, -1, -1, -1, -1, -1};
6193 const DWORD point_rep6[] = {0, 1, 2, 1, 4, 5, 1, 5, 2};
6201 const struct vertex_pnc vertices7[] =
6203 {{ 0.0f, 3.0f, 0.f},
up,
RED},
6204 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
6205 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
6207 {{ 3.0f, 3.0f, 0.f},
up,
GREEN},
6208 {{ 3.0f, 0.0f, 0.f},
up,
RED},
6209 {{ 1.0f, 0.0f, 0.f},
up,
BLUE},
6211 const DWORD indices7[] = {0, 1, 2, 3, 3, 3};
6212 const unsigned int num_vertices7 =
ARRAY_SIZE(vertices7);
6213 const unsigned int num_faces7 = num_vertices7 / VERTS_PER_FACE;
6214 const DWORD exp_adjacency7[] = {-1, -1, -1, -1, -1, -1};
6215 const DWORD exp_id_adjacency7[] = {-1, -1, -1, -1, -1, -1};
6216 const DWORD point_rep7[] = {0, 1, 2, 3, 4, 5};
6228 const struct vertex_pnc vertices8[] =
6230 {{ 0.0f, 3.0f, 0.f},
up,
RED},
6231 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
6232 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
6234 {{ 4.0, -4.0, 0.f},
up,
RED},
6235 {{ 6.0, -4.0, 0.f},
up,
BLUE},
6236 {{ 4.0, -7.0, 0.f},
up,
GREEN},
6238 {{ 4.0f, 3.0f, 0.f},
up,
GREEN},
6239 {{ 6.0f, 0.0f, 0.f},
up,
BLUE},
6240 {{ 4.0f, 0.0f, 0.f},
up,
RED},
6242 {{ 3.0f, 3.0f, 0.f},
up,
GREEN},
6243 {{ 3.0f, 0.0f, 0.f},
up,
RED},
6244 {{ 1.0f, 0.0f, 0.f},
up,
BLUE},
6246 const DWORD indices8[] = {0, 1, 2, 9, 10, 11, 6, 7, 8, 3, 4, 5};
6247 const WORD indices8_16bit[] = {0, 1, 2, 9, 10, 11, 6, 7, 8, 3, 4, 5};
6248 const unsigned int num_vertices8 =
ARRAY_SIZE(vertices8);
6249 const unsigned int num_faces8 = num_vertices8 / VERTS_PER_FACE;
6250 const DWORD exp_adjacency8[] = {-1, 1, -1, 2, -1, 0, -1, 3, 1, 2, -1, -1};
6251 const DWORD exp_id_adjacency8[] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
6252 const DWORD point_rep8[] = {0, 1, 2, 3, 4, 5, 1, 4, 3, 1, 3, 2};
6260 const struct vertex_pnc vertices9[] =
6262 {{ 0.0f, 3.0f, 0.f},
up,
RED},
6263 {{ 2.0f, 3.0f, 0.f},
up,
GREEN},
6264 {{ 0.0f, 0.0f, 0.f},
up,
BLUE},
6266 {{ 2.0f, 0.0f, 0.f},
up,
RED},
6268 const DWORD indices9[] = {0, 1, 2, 1, 3, 2};
6269 const unsigned int num_vertices9 =
ARRAY_SIZE(vertices9);
6270 const unsigned int num_faces9 = 2;
6271 const DWORD exp_adjacency9[] = {-1, 1, -1, -1, -1, 0};
6272 const DWORD exp_id_adjacency9[] = {-1, 1, -1, -1, -1, 0};
6273 const DWORD point_rep9[] = {0, 1, 2, 3};
6276 ID3DXMesh *mesh_null_check =
NULL;
6280 const struct vertex_pnc *vertices;
6282 const DWORD num_vertices;
6283 const DWORD num_faces;
6284 const DWORD *point_reps;
6285 const DWORD *exp_adjacency;
6286 const DWORD *exp_id_adjacency;
6393 (
DWORD*)indices8_16bit,
6407 skip(
"Couldn't create test context\n");
6417 skip(
"Couldn't create mesh %d. Got %lx expected D3D_OK\n",
i,
hr);
6422 mesh_null_check =
mesh;
6424 adjacency =
malloc(VERTS_PER_FACE *
tc[
i].num_faces *
sizeof(*adjacency));
6427 skip(
"Couldn't allocate adjacency array.\n");
6434 skip(
"Couldn't lock vertex buffer.\n");
6441 skip(
"Couldn't unlock vertex buffer.\n");
6444 hr =
mesh->lpVtbl->LockIndexBuffer(
mesh, 0, &index_buffer);
6447 skip(
"Couldn't lock index buffer.\n");
6460 skip(
"Couldn't unlock index buffer.\n");
6464 hr =
mesh->lpVtbl->LockAttributeBuffer(
mesh, 0, &attributes_buffer);
6467 skip(
"Couldn't lock attributes buffer.\n");
6471 hr =
mesh->lpVtbl->UnlockAttributeBuffer(
mesh);
6474 skip(
"Couldn't unlock attributes buffer.\n");
6479 for (
j = 0;
j < VERTS_PER_FACE *
tc[
i].num_faces;
j++) adjacency[
j] = -2;
6481 hr =
mesh->lpVtbl->ConvertPointRepsToAdjacency(
mesh,
tc[
i].point_reps, adjacency);
6482 ok(
hr ==
D3D_OK,
"ConvertPointRepsToAdjacency failed case %d. "
6483 "Got %lx expected D3D_OK\n",
i,
hr);
6485 for (
j = 0;
j < VERTS_PER_FACE *
tc[
i].num_faces;
j++)
6487 ok(adjacency[
j] ==
tc[
i].exp_adjacency[
j],
6488 "Unexpected adjacency information at (%d, %d)."
6489 " Got %ld expected %ld\n",
6490 i,
j, adjacency[
j],
tc[
i].exp_adjacency[
j]);
6494 for (
j = 0;
j < VERTS_PER_FACE *
tc[
i].num_faces;
j++) adjacency[
j] = -2;
6495 hr = mesh_null_check->lpVtbl->ConvertPointRepsToAdjacency(
mesh,
NULL, adjacency);
6496 ok(
hr ==
D3D_OK,
"ConvertPointRepsToAdjacency NULL point_reps. "
6497 "Got %lx expected D3D_OK\n",
hr);
6498 for (
j = 0;
j < VERTS_PER_FACE *
tc[
i].num_faces;
j++)
6500 ok(adjacency[
j] ==
tc[
i].exp_id_adjacency[
j],
6501 "Unexpected adjacency information (id) at (%d, %d)."
6502 " Got %ld expected %ld\n",
6503 i,
j, adjacency[
j],
tc[
i].exp_id_adjacency[
j]);
6513 hr = mesh_null_check->lpVtbl->ConvertPointRepsToAdjacency(mesh_null_check,
tc[0].point_reps,
NULL);
6515 "Got %lx expected D3DERR_INVALIDCALL\n",
hr);
6516 hr = mesh_null_check->lpVtbl->ConvertPointRepsToAdjacency(mesh_null_check,
NULL,
NULL);
6518 "Got %lx expected D3DERR_INVALIDCALL\n",
hr);
6521 if (mesh_null_check)
6522 mesh_null_check->lpVtbl->
Release(mesh_null_check);
6531 const void *vertices,
const DWORD vertex_size,
6537 DWORD *attributes_buffer;
6543 skip(
"Couldn't create mesh. Got %lx expected D3D_OK\n",
hr);
6551 skip(
"Couldn't lock vertex buffer.\n");
6558 skip(
"Couldn't unlock vertex buffer.\n");
6562 hr =
mesh->lpVtbl->LockIndexBuffer(
mesh, 0, &index_buffer);
6565 skip(
"Couldn't lock index buffer.\n");
6577 for (
i = 0;
i < 3 * num_faces;
i++)
6578 indices_32bit[
i] =
i;
6588 WORD *indices_16bit = (
WORD*)index_buffer;
6590 for (
i = 0;
i < 3 * num_faces;
i++)
6591 indices_16bit[
i] =
i;
6596 skip(
"Couldn't unlock index buffer.\n");
6600 hr =
mesh->lpVtbl->LockAttributeBuffer(
mesh, 0, &attributes_buffer);
6603 skip(
"Couldn't lock attributes buffer.\n");
6612 hr =
mesh->lpVtbl->UnlockAttributeBuffer(
mesh);
6615 skip(
"Couldn't unlock attributes buffer.\n");
6646 d |= (
y << 10) & 0xffc00;
6647 d |= (
z << 20) & 0x3ff00000;
6648 d |= (
w << 30) & 0xc0000000;
6658 d |= (
y << 10) & 0xffc00;
6659 d |= (
z << 20) & 0x3ff00000;
6660 d |= (
w << 30) & 0xc0000000;
6670 v.y = (
d & 0xffc00) >> 10;
6671 v.z = (
d & 0x3ff00000) >> 20;
6672 v.w = (
d & 0xc0000000) >> 30;
6682 v.y = (
d & 0xffc00) >> 10;
6683 v.z = (
d & 0x3ff00000) >> 20;
6684 v.w = (
d & 0xc0000000) >> 30;
6691 const char *usage_strings[] =
6698 "texture coordinates",
6701 "tessellation factor",
6702 "position transformed",
6713 switch (decl_ptr->
Type)
6720 ok_(__FILE__,
line)(diff <=
PRECISION,
"Mesh %d: Got %f for vertex %d %s, expected %f.\n",
6721 mesh_number, *got, vertex_number, usage_strings[decl_ptr->
Usage], *
exp);
6729 ok_(__FILE__,
line)(diff <=
PRECISION,
"Mesh %d: Got (%f, %f) for vertex %d %s, expected (%f, %f).\n",
6730 mesh_number, got->
x, got->
y, vertex_number, usage_strings[decl_ptr->
Usage],
exp->x,
exp->y);
6739 ok_(__FILE__,
line)(diff <=
PRECISION,
"Mesh %d: Got (%f, %f, %f) for vertex %d %s, expected (%f, %f, %f).\n",
6740 mesh_number, got->
x, got->
y, got->
z, vertex_number, usage_strings[decl_ptr->
Usage],
exp->x,
exp->y,
exp->z);
6750 ok_(__FILE__,
line)(diff <=
PRECISION,
"Mesh %d: Got (%f, %f, %f, %f) for vertex %d %s, expected (%f, %f, %f, %f).\n",
6751 mesh_number, got->
x, got->
y, got->
z, got->
w, vertex_number, usage_strings[decl_ptr->
Usage],
exp->x,
exp->y,
exp->z, got->
w);
6758 BOOL same_color = got[0] ==
exp[0] && got[1] ==
exp[1]
6759 && got[2] ==
exp[2] && got[3] ==
exp[3];
6760 const char *color_types[] = {
"diffuse",
"specular",
"undefined color"};
6762 if (usage_index > 1) usage_index = 2;
6763 ok_(__FILE__,
line)(same_color,
"Mesh %d: Got (%u, %u, %u, %u) for vertex %d %s, expected (%u, %u, %u, %u).\n",
6764 mesh_number, got[0], got[1], got[2], got[3], vertex_number, color_types[usage_index],
exp[0],
exp[1],
exp[2],
exp[3]);
6772 BOOL same = got[0] ==
exp[0] && got[1] ==
exp[1]
6773 && got[2] ==
exp[2] && got[3] ==
exp[3];
6774 ok_(__FILE__,
line)(same,
"Mesh %d: Got (%u, %u, %u, %u) for vertex %d %s, expected (%u, %u, %u, %u).\n",
6775 mesh_number, got[0], got[1], got[2], got[3], vertex_number, usage_strings[decl_ptr->
Usage],
exp[0],
exp[1],
exp[2],
exp[3]);
6783 BOOL same = got[0] ==
exp[0] && got[1] ==
exp[1];
6784 ok_(__FILE__,
line)(same,
"Mesh %d: Got (%hd, %hd) for vertex %d %s, expected (%hd, %hd).\n",
6785 mesh_number, got[0], got[1], vertex_number, usage_strings[decl_ptr->
Usage],
exp[0],
exp[1]);
6793 BOOL same = got[0] ==
exp[0] && got[1] ==
exp[1]
6794 && got[2] ==
exp[2] && got[3] ==
exp[3];
6795 ok_(__FILE__,
line)(same,
"Mesh %d: Got (%hd, %hd, %hd, %hd) for vertex %d %s, expected (%hd, %hd, %hd, %hd).\n",
6796 mesh_number, got[0], got[1], got[2], got[3], vertex_number, usage_strings[decl_ptr->
Usage],
exp[0],
exp[1],
exp[2],
exp[3]);
6803 BOOL same = got[0] ==
exp[0] && got[1] ==
exp[1];
6804 ok_(__FILE__,
line)(same,
"Mesh %d: Got (%hu, %hu) for vertex %d %s, expected (%hu, %hu).\n",
6805 mesh_number, got[0], got[1], vertex_number, usage_strings[decl_ptr->
Usage],
exp[0],
exp[1]);
6812 BOOL same = got[0] ==
exp[0] && got[1] ==
exp[1]
6813 && got[2] ==
exp[2] && got[3] ==
exp[3];
6814 ok_(__FILE__,
line)(same,
"Mesh %d: Got (%hu, %hu, %hu, %hu) for vertex %d %s, expected (%hu, %hu, %hu, %hu).\n",
6815 mesh_number, got[0], got[1], got[2], got[3], vertex_number, usage_strings[decl_ptr->
Usage],
exp[0],
exp[1],
exp[2],
exp[3]);
6825 ok_(__FILE__,
line)(same,
"Mesh %d: Got (%u, %u, %u, %u) for vertex %d %s, expected (%u, %u, %u, %u).\n",
6826 mesh_number, got_udec3.
x, got_udec3.
y, got_udec3.
z, got_udec3.
w, vertex_number, usage_strings[decl_ptr->
Usage], exp_udec3.
x, exp_udec3.
y, exp_udec3.
z, exp_udec3.
w);
6837 ok_(__FILE__,
line)(same,
"Mesh %d: Got (%d, %d, %d, %d) for vertex %d %s, expected (%d, %d, %d, %d).\n",
6838 mesh_number, got_dec3n.
x, got_dec3n.
y, got_dec3n.
z, got_dec3n.
w, vertex_number, usage_strings[decl_ptr->
Usage], exp_dec3n.
x, exp_dec3n.
y, exp_dec3n.
z, exp_dec3n.
w);
6845 BOOL same = got[0] ==
exp[0] && got[1] ==
exp[1];
6846 ok_(__FILE__,
line)(same,
"Mesh %d: Got (%hx, %hx) for vertex %d %s, expected (%hx, %hx).\n",
6847 mesh_number, got[0], got[1], vertex_number, usage_strings[decl_ptr->
Usage],
exp[0],
exp[1]);
6854 BOOL same = got[0] ==
exp[0] && got[1] ==
exp[1]
6855 && got[2] ==
exp[2] && got[3] ==
exp[3];
6856 ok_(__FILE__,
line)(same,
"Mesh %d: Got (%hx, %hx, %hx, %hx) for vertex %d %s, expected (%hx, %hx, %hx, %hx).\n",
6857 mesh_number, got[0], got[1], got[2], got[3], vertex_number, usage_strings[decl_ptr->
Usage],
exp[0],
exp[1],
exp[2],
exp[3]);
6876 const UINT VERTS_PER_FACE = 3;
6878 struct vertex_normal
6883 struct vertex_blendweight
6888 struct vertex_texcoord
6898 struct vertex_color_ubyte4
6903 struct vertex_texcoord_short2
6908 struct vertex_texcoord_ushort2n
6913 struct vertex_normal_short4
6918 struct vertex_texcoord_float16_2
6923 struct vertex_texcoord_float16_4
6928 struct vertex_normal_udec3
6933 struct vertex_normal_dec3n
6938 UINT vertex_size_normal =
sizeof(
struct vertex_normal);
6939 UINT vertex_size_blendweight =
sizeof(
struct vertex_blendweight);
6940 UINT vertex_size_texcoord =
sizeof(
struct vertex_texcoord);
6941 UINT vertex_size_color =
sizeof(
struct vertex_color);
6942 UINT vertex_size_color_ubyte4 =
sizeof(
struct vertex_color_ubyte4);
6943 UINT vertex_size_texcoord_short2 =
sizeof(
struct vertex_texcoord_short2);
6944 UINT vertex_size_normal_short4 =
sizeof(
struct vertex_normal_short4);
6945 UINT vertex_size_texcoord_float16_2 =
sizeof(
struct vertex_texcoord_float16_2);
6946 UINT vertex_size_texcoord_float16_4 =
sizeof(
struct vertex_texcoord_float16_4);
6947 UINT vertex_size_normal_udec3 =
sizeof(
struct vertex_normal_udec3);
6948 UINT vertex_size_normal_dec3n =
sizeof(
struct vertex_normal_dec3n);
7076 const struct vertex vertices0[] =
7078 {{ 0.0f, 3.0f, 0.f},
up},
7079 {{ 2.0f, 3.0f, 0.f},
up},
7080 {{ 0.0f, 0.0f, 0.f},
up},
7082 const DWORD indices0[] = {0, 1, 2};
7083 const DWORD attributes0[] = {0};
7084 const DWORD exp_indices0[] = {0, 1, 2};
7089 const DWORD adjacency0[] = {-1, -1, -1};
7090 const struct vertex exp_vertices0[] =
7092 {{ 0.0f, 3.0f, 0.f},
up},
7093 {{ 2.0f, 3.0f, 0.f},
up},
7094 {{ 0.0f, 0.0f, 0.f},
up},
7096 const DWORD exp_face_remap0[] = {0};
7097 const DWORD exp_vertex_remap0[] = {0, 1, 2};
7106 const struct vertex_normal vertices1[] =
7108 {{ 0.0f, 3.0f, 0.f},
up},
7109 {{ 2.0f, 3.0f, 0.f},
up},
7110 {{ 0.0f, 0.0f, 0.f},
up},
7112 {{ 3.0f, 3.0f, 0.f},
up},
7113 {{ 3.0f, 0.0f, 0.f},
up},
7114 {{ 1.0f, 0.0f, 0.f},
up},
7116 const DWORD indices1[] = {0, 1, 2, 3, 4, 5};
7117 const DWORD attributes1[] = {0, 0};
7122 const DWORD adjacency1[] = {-1, 1, -1, -1, -1, 0};
7123 const struct vertex_normal exp_vertices1[] =
7125 {{ 0.0f, 3.0f, 0.f},
up},
7126 {{ 2.0f, 3.0f, 0.f},
up},
7127 {{ 0.0f, 0.0f, 0.f},
up},
7129 {{ 3.0f, 0.0f, 0.f},
up}
7131 const DWORD exp_indices1[] = {0, 1, 2, 1, 3, 2};
7132 const DWORD exp_face_remap1[] = {0, 1};
7133 const DWORD exp_vertex_remap1[] = {0, 1, 2, 4, -1, -1};
7137 const struct vertex_normal vertices2[] =
7139 {{ 0.0f, 3.0f, 0.f},
up},
7140 {{ 2.0f, 3.0f, 0.f},
up},
7141 {{ 0.0f, 0.0f, 0.f},
up},
7143 {{ 3.0f, 3.0f, 0.f}, {0.0f, 0.5f, 0.5f}},
7144 {{ 3.0f, 0.0f, 0.f},
up},
7145 {{ 1.0f, 0.0f, 0.f}, {0.2f, 0.4f, 0.4f}},
7147 const DWORD indices2[] = {0, 1, 2, 3, 4, 5};
7148 const DWORD attributes2[] = {0, 0};
7152 const D3DXWELDEPSILONS epsilons2 = {1.0f, 0.0f, 0.499999f, 0.0f, 0.0f, 0.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7153 const DWORD adjacency2[] = {-1, 1, -1, -1, -1, 0};
7154 const struct vertex_normal exp_vertices2[] =
7156 {{ 0.0f, 3.0f, 0.f},
up},
7157 {{ 2.0f, 3.0f, 0.f},
up},
7158 {{ 0.0f, 0.0f, 0.f},
up},
7160 {{ 2.0f, 3.0f, 0.f}, {0.0f, 0.5f, 0.5f}},
7161 {{ 3.0f, 0.0f, 0.f},
up},
7162 {{ 0.0f, 0.0f, 0.f}, {0.2f, 0.4f, 0.4f}},
7164 const DWORD exp_indices2[] = {0, 1, 2, 3, 4, 5};
7165 const DWORD exp_face_remap2[] = {0, 1};
7166 const DWORD exp_vertex_remap2[] = {0, 1, 2, 3, 4, 5};
7169 const struct vertex_normal vertices3[] =
7171 {{ 0.0f, 3.0f, 0.f},
up},
7172 {{ 2.0f, 3.0f, 0.f},
up},
7173 {{ 0.0f, 0.0f, 0.f},
up},
7175 {{ 3.0f, 3.0f, 0.f}, {0.0f, 0.5f, 0.5f}},
7176 {{ 3.0f, 0.0f, 0.f},
up},
7177 {{ 1.0f, 0.0f, 0.f}, {0.2f, 0.4f, 0.4f}},
7179 const DWORD indices3[] = {0, 1, 2, 3, 4, 5};
7180 const DWORD attributes3[] = {0, 0};
7184 const D3DXWELDEPSILONS epsilons3 = {1.0f, 0.0f, 0.5f, 0.0f, 0.0f, 0.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7185 const DWORD adjacency3[] = {-1, 1, -1, -1, -1, 0};
7186 const struct vertex_normal exp_vertices3[] =
7188 {{ 0.0f, 3.0f, 0.f},
up},
7189 {{ 2.0f, 3.0f, 0.f},
up},
7190 {{ 0.0f, 0.0f, 0.f},
up},
7192 {{ 3.0f, 0.0f, 0.f},
up},
7193 {{ 0.0f, 0.0f, 0.f}, {0.2f, 0.4f, 0.4f}},
7195 const DWORD exp_indices3[] = {0, 1, 2, 1, 3, 4};
7196 const DWORD exp_face_remap3[] = {0, 1};
7197 const DWORD exp_vertex_remap3[] = {0, 1, 2, 4, 5, -1};
7200 const struct vertex_normal vertices4[] =
7202 {{ 0.0f, 3.0f, 0.f},
up},
7203 {{ 2.0f, 3.0f, 0.f},
up},
7204 {{ 0.0f, 0.0f, 0.f},
up},
7206 {{ 3.0f, 3.0f, 0.f}, {0.0f, 0.5f, 0.5f}},
7207 {{ 3.0f, 0.0f, 0.f},
up},
7208 {{ 1.0f, 0.0f, 0.f}, {0.2f, 0.4f, 0.4f}},
7210 const DWORD indices4[] = {0, 1, 2, 3, 4, 5};
7211 const DWORD attributes4[] = {0, 0};
7215 const D3DXWELDEPSILONS epsilons4 = {1.0f, 0.0f, 0.6f, 0.0f, 0.0f, 0.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7216 const DWORD adjacency4[] = {-1, 1, -1, -1, -1, 0};
7217 const struct vertex_normal exp_vertices4[] =
7219 {{ 0.0f, 3.0f, 0.f},
up},
7220 {{ 2.0f, 3.0f, 0.f},
up},
7221 {{ 0.0f, 0.0f, 0.f},
up},
7223 {{ 3.0f, 0.0f, 0.f},
up},
7225 const DWORD exp_indices4[] = {0, 1, 2, 1, 3, 2};
7226 const DWORD exp_face_remap4[] = {0, 1};
7227 const DWORD exp_vertex_remap4[] = {0, 1, 2, 4, -1, -1};
7236 const struct vertex_normal vertices5[] =
7238 {{ 0.0f, 3.0f, 0.f},
up},
7239 {{ 2.0f, 3.0f, 0.f},
up},
7240 {{ 0.0f, 0.0f, 0.f},
up},
7242 {{ 3.0f, 3.0f, 0.f},
up},
7243 {{ 3.0f, 0.0f, 0.f},
up},
7244 {{ 1.0f, 0.0f, 0.f},
up},
7246 {{ 4.0f, 3.0f, 0.f},
up},
7247 {{ 6.0f, 0.0f, 0.f},
up},
7248 {{ 4.0f, 0.0f, 0.f},
up},
7250 const DWORD indices5[] = {0, 1, 2, 6, 7, 8, 3, 4, 5};
7251 const DWORD exp_indices5[] = {0, 1, 2, 1, 4, 2, 1, 3, 4};
7252 const DWORD attributes5[] = {0, 0, 0};
7256 const DWORD adjacency5[] = {-1, 1, -1, 2, -1, 0, -1, -1, 1};
7257 const struct vertex_normal exp_vertices5[] =
7259 {{ 0.0f, 3.0f, 0.f},
up},
7260 {{ 2.0f, 3.0f, 0.f},
up},
7261 {{ 0.0f, 0.0f, 0.f},
up},
7263 {{ 3.0f, 0.0f, 0.f},
up},
7264 {{ 1.0f, 0.0f, 0.f},
up},
7266 const DWORD exp_face_remap5[] = {0, 1, 2};
7267 const DWORD exp_vertex_remap5[] = {0, 1, 2, 4, 5, -1, -1, -1, -1};
7271 const struct vertex_normal vertices6[] =
7273 {{ 0.0f, 3.0f, 0.f},
up},
7274 {{ 2.0f, 3.0f, 0.f},
up},
7275 {{ 0.0f, 0.0f, 0.f},
up},
7277 {{ 3.0f, 3.0f, 0.f}, {0.0f, 0.5f, 0.5f}},
7278 {{ 3.0f, 0.0f, 0.f},
up},
7279 {{ 1.0f, 0.0f, 0.f}, {0.2f, 0.4f, 0.4f}},
7281 const DWORD indices6[] = {0, 1, 2, 3, 4, 5};
7282 const DWORD attributes6[] = {0, 0};
7286 const D3DXWELDEPSILONS epsilons6 = {1.0f, 0.0f, 0.6f, 0.0f, 0.0f, 0.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7287 const DWORD adjacency6[] = {-1, 1, -1, -1, -1, 0};
7288 const struct vertex_normal exp_vertices6[] =
7290 {{ 0.0f, 3.0f, 0.f},
up},
7291 {{ 2.0f, 3.0f, 0.f},
up},
7292 {{ 0.0f, 0.0f, 0.f},
up},
7294 {{ 2.0f, 3.0f, 0.f},
up},
7295 {{ 3.0f, 0.0f, 0.f},
up},
7296 {{ 0.0f, 0.0f, 0.f},
up},
7299 const DWORD exp_indices6[] = {0, 1, 2, 3, 4, 5};
7300 const DWORD exp_face_remap6[] = {0, 1};
7301 const DWORD exp_vertex_remap6[] = {0, 1, 2, 3, 4, 5};
7304 const WORD indices6_16bit[] = {0, 1, 2, 3, 4, 5};
7306 const struct vertex_normal vertices8[] =
7308 {{ 0.0f, 3.0f, 0.f},
up},
7309 {{ 2.0f, 3.0f, 0.f},
up},
7310 {{ 0.0f, 0.0f, 0.f},
up},
7312 {{ 3.0f, 3.0f, 0.f}, {0.0f, 0.5f, 0.5f}},
7313 {{ 3.0f, 0.0f, 0.f},
up},
7314 {{ 1.0f, 0.0f, 0.f}, {0.2f, 0.4f, 0.4f}},
7316 const DWORD indices8[] = {0, 1, 2, 1, 3, 4};
7317 const DWORD attributes8[] = {0, 0};
7321 const D3DXWELDEPSILONS epsilons8 = {1.0f, 0.0f, 0.5f, 0.0f, 0.0f, 0.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7322 const DWORD adjacency8[] = {-1, 1, -1, -1, -1, 0};
7323 const struct vertex_normal exp_vertices8[] =
7325 {{ 0.0f, 3.0f, 0.f},
up},
7326 {{ 2.0f, 3.0f, 0.f},
up},
7327 {{ 0.0f, 0.0f, 0.f},
up},
7329 {{ 3.0f, 3.0f, 0.f}, {0.0f, 0.5f, 0.5f}},
7330 {{ 3.0f, 0.0f, 0.f},
up},
7332 const DWORD exp_indices8[] = {0, 1, 2, 1, 3, 4};
7333 const DWORD exp_face_remap8[] = {0, 1};
7334 const DWORD exp_vertex_remap8[] = {0, 1, 2, 3, 4, -1};
7338 const struct vertex_normal vertices9[] =
7340 {{ 0.0f, 3.0f, 0.f},
up},
7341 {{ 2.0f, 3.0f, 0.f},
up},
7342 {{ 0.0f, 0.0f, 0.f},
up},
7344 {{ 3.0f, 3.0f, 0.f}, {0.0f, 0.5f, 0.5f}},
7345 {{ 3.0f, 0.0f, 0.f},
up},
7346 {{ 1.0f, 0.0f, 0.f}, {0.2f, 0.4f, 0.4f}},
7348 const DWORD indices9[] = {0, 1, 2, 3, 4, 5};
7349 const DWORD attributes9[] = {0, 1};
7353 const D3DXWELDEPSILONS epsilons9 = {1.0f, 0.0f, 0.6f, 0.0f, 0.0f, 0.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7354 const DWORD adjacency9[] = {-1, 1, -1, -1, -1, 0};
7355 const struct vertex_normal exp_vertices9[] =
7357 {{ 0.0f, 3.0f, 0.f},
up},
7358 {{ 2.0f, 3.0f, 0.f},
up},
7359 {{ 0.0f, 0.0f, 0.f},
up},
7361 {{ 3.0f, 0.0f, 0.f},
up},
7363 const DWORD exp_indices9[] = {0, 1, 2, 1, 3, 2};
7364 const DWORD exp_face_remap9[] = {0, 1};
7365 const DWORD exp_vertex_remap9[] = {0, 1, 2, 4, -1, -1};
7368 const struct vertex_blendweight vertices10[] =
7370 {{ 0.0f, 3.0f, 0.f}, 1.0f},
7371 {{ 2.0f, 3.0f, 0.f}, 1.0f},
7372 {{ 0.0f, 0.0f, 0.f}, 1.0f},
7374 {{ 3.0f, 3.0f, 0.f}, 0.9},
7375 {{ 3.0f, 0.0f, 0.f}, 1.0},
7376 {{ 1.0f, 0.0f, 0.f}, 0.4},
7378 const DWORD indices10[] = {0, 1, 2, 3, 4, 5};
7379 const DWORD attributes10[] = {0, 0};
7383 const D3DXWELDEPSILONS epsilons10 = {1.0f, 0.1f +
FLT_EPSILON, 0.0f, 0.0f, 0.0f, 0.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7384 const DWORD adjacency10[] = {-1, 1, -1, -1, -1, 0};
7385 const struct vertex_blendweight exp_vertices10[] =
7387 {{ 0.0f, 3.0f, 0.f}, 1.0f},
7388 {{ 2.0f, 3.0f, 0.f}, 1.0f},
7389 {{ 0.0f, 0.0f, 0.f}, 1.0f},
7391 {{ 3.0f, 0.0f, 0.f}, 1.0},
7392 {{ 0.0f, 0.0f, 0.f}, 0.4},
7394 const DWORD exp_indices10[] = {0, 1, 2, 1, 3, 4};
7395 const DWORD exp_face_remap10[] = {0, 1};
7396 const DWORD exp_vertex_remap10[] = {0, 1, 2, 4, 5, -1};
7399 const struct vertex_texcoord vertices11[] =
7401 {{ 0.0f, 3.0f, 0.f}, {1.0f, 1.0f}},
7402 {{ 2.0f, 3.0f, 0.f}, {0.5f, 0.7f}},
7403 {{ 0.0f, 0.0f, 0.f}, {-0.2f, -0.3f}},
7405 {{ 3.0f, 3.0f, 0.f}, {0.2f, 0.3f}},
7406 {{ 3.0f, 0.0f, 0.f}, {1.0f, 1.0f}},
7407 {{ 1.0f, 0.0f, 0.f}, {0.1f, 0.2f}}
7409 const DWORD indices11[] = {0, 1, 2, 3, 4, 5};
7410 const DWORD attributes11[] = {0, 0};
7414 const D3DXWELDEPSILONS epsilons11 = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0.4f +
FLT_EPSILON, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7415 const DWORD adjacency11[] = {-1, 1, -1, -1, -1, 0};
7416 const struct vertex_texcoord exp_vertices11[] =
7418 {{ 0.0f, 3.0f, 0.f}, {1.0f, 1.0f}},
7419 {{ 2.0f, 3.0f, 0.f}, {0.5f, 0.7f}},
7420 {{ 0.0f, 0.0f, 0.f}, {-0.2f, -0.3f}},
7422 {{ 3.0f, 0.0f, 0.f}, {1.0f, 1.0f}},
7423 {{ 0.0f, 0.0f, 0.f}, {0.1f, 0.2f}},
7425 const DWORD exp_indices11[] = {0, 1, 2, 1, 3, 4};
7426 const DWORD exp_face_remap11[] = {0, 1};
7427 const DWORD exp_vertex_remap11[] = {0, 1, 2, 4, 5, -1};
7430 const struct vertex_color vertices12[] =
7432 {{ 0.0f, 3.0f, 0.f}, 0xFFFFFFFF},
7433 {{ 2.0f, 3.0f, 0.f}, 0xFFFFFFFF},
7434 {{ 0.0f, 0.0f, 0.f}, 0xFFFFFFFF},
7436 {{ 3.0f, 3.0f, 0.f}, 0x00000000},
7437 {{ 3.0f, 0.0f, 0.f}, 0xFFFFFFFF},
7438 {{ 1.0f, 0.0f, 0.f}, 0x88888888},
7440 const DWORD indices12[] = {0, 1, 2, 3, 4, 5};
7441 const DWORD attributes12[] = {0, 0};
7445 const D3DXWELDEPSILONS epsilons12 = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.5f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7446 const DWORD adjacency12[] = {-1, 1, -1, -1, -1, 0};
7447 const struct vertex_color exp_vertices12[] =
7449 {{ 0.0f, 3.0f, 0.f}, 0xFFFFFFFF},
7450 {{ 2.0f, 3.0f, 0.f}, 0xFFFFFFFF},
7451 {{ 0.0f, 0.0f, 0.f}, 0xFFFFFFFF},
7453 {{ 2.0f, 3.0f, 0.f}, 0x00000000},
7454 {{ 3.0f, 0.0f, 0.f}, 0xFFFFFFFF},
7456 const DWORD exp_indices12[] = {0, 1, 2, 3, 4, 2};
7457 const DWORD exp_face_remap12[] = {0, 1};
7458 const DWORD exp_vertex_remap12[] = {0, 1, 2, 3, 4, -1};
7463 const struct vertex_normal vertices13[] =
7465 {{ 0.0f, 3.0f, 0.f},
up},
7466 {{ 2.0f, 3.0f, 0.f},
up},
7467 {{ 0.0f, 0.0f, 0.f},
up},
7469 {{ 3.0f, 3.0f, 0.f}, {0.0f, 0.5f, 0.5f}},
7470 {{ 3.0f, 0.0f, 0.f},
up},
7471 {{ 1.0f, 0.0f, 0.f}, {0.2f, 0.4f, 0.4f}},
7473 const DWORD indices13[] = {0, 1, 2, 3, 4, 5};
7474 const DWORD attributes13[] = {0, 0};
7478 const D3DXWELDEPSILONS epsilons13 = {1.0f, 0.0f, 0.5f, 0.0f, 0.0f, 0.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7479 const DWORD adjacency13[] = {-1, 1, -1, -1, -1, 0};
7480 const struct vertex_normal exp_vertices13[] =
7482 {{ 0.0f, 3.0f, 0.f},
up},
7483 {{ 2.0f, 3.0f, 0.f},
up},
7484 {{ 0.0f, 0.0f, 0.f},
up},
7486 {{ 3.0f, 0.0f, 0.f},
up},
7487 {{ 0.0f, 0.0f, 0.f}, {0.2f, 0.4f, 0.4f}},
7489 const DWORD exp_indices13[] = {0, 1, 2, 1, 3, 4};
7490 const DWORD exp_face_remap13[] = {0, 1};
7491 const DWORD exp_vertex_remap13[] = {0, 1, 2, 4, 5, -1};
7494 const struct vertex_color vertices14[] =
7496 {{ 0.0f, 3.0f, 0.f}, 0xFFFFFFFF},
7497 {{ 2.0f, 3.0f, 0.f}, 0xFFFFFFFF},
7498 {{ 0.0f, 0.0f, 0.f}, 0xFFFFFFFF},
7500 {{ 3.0f, 3.0f, 0.f}, 0x00000000},
7501 {{ 3.0f, 0.0f, 0.f}, 0xFFFFFFFF},
7502 {{ 1.0f, 0.0f, 0.f}, 0x01010101},
7504 const DWORD indices14[] = {0, 1, 2, 3, 4, 5};
7505 const DWORD attributes14[] = {0, 0};
7509 const D3DXWELDEPSILONS epsilons14 = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 254.0f/255.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7510 const DWORD adjacency14[] = {-1, 1, -1, -1, -1, 0};
7511 const struct vertex_color exp_vertices14[] =
7513 {{ 0.0f, 3.0f, 0.f}, 0xFFFFFFFF},
7514 {{ 2.0f, 3.0f, 0.f}, 0xFFFFFFFF},
7515 {{ 0.0f, 0.0f, 0.f}, 0xFFFFFFFF},
7517 {{ 2.0f, 3.0f, 0.f}, 0x00000000},
7518 {{ 3.0f, 0.0f, 0.f}, 0xFFFFFFFF},
7520 const DWORD exp_indices14[] = {0, 1, 2, 3, 4, 2};
7521 const DWORD exp_face_remap14[] = {0, 1};
7522 const DWORD exp_vertex_remap14[] = {0, 1, 2, 3, 4, -1};
7527 const struct vertex_color_ubyte4 vertices15[] =
7529 {{ 0.0f, 3.0f, 0.f}, {255, 255, 255, 255}},
7530 {{ 2.0f, 3.0f, 0.f}, {255, 255, 255, 255}},
7531 {{ 0.0f, 0.0f, 0.f}, {255, 255, 255, 255}},
7533 {{ 3.0f, 3.0f, 0.f}, { 0, 0, 0, 0}},
7534 {{ 3.0f, 0.0f, 0.f}, {255, 255, 255, 255}},
7535 {{ 1.0f, 0.0f, 0.f}, { 1, 1, 1, 1}},
7537 const DWORD indices15[] = {0, 1, 2, 3, 4, 5};
7538 const DWORD attributes15[] = {0, 0};
7542 const D3DXWELDEPSILONS epsilons15 = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 254.0f/255.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7543 const DWORD adjacency15[] = {-1, 1, -1, -1, -1, 0};
7544 const struct vertex_color_ubyte4 exp_vertices15[] =
7546 {{ 0.0f, 3.0f, 0.f}, {255, 255, 255, 255}},
7547 {{ 2.0f, 3.0f, 0.f}, {255, 255, 255, 255}},
7548 {{ 0.0f, 0.0f, 0.f}, {255, 255, 255, 255}},
7550 {{ 2.0f, 3.0f, 0.f}, { 0, 0, 0, 0}},
7551 {{ 3.0f, 0.0f, 0.f}, {255, 255, 255, 255}},
7553 const DWORD exp_indices15[] = {0, 1, 2, 3, 4, 2};
7554 const DWORD exp_face_remap15[] = {0, 1};
7555 const DWORD exp_vertex_remap15[] = {0, 1, 2, 3, 4, -1};
7561 const struct vertex_color_ubyte4 vertices16[] =
7563 {{ 0.0f, 3.0f, 0.f}, {255, 255, 255, 255}},
7564 {{ 2.0f, 3.0f, 0.f}, {255, 255, 255, 255}},
7565 {{ 0.0f, 0.0f, 0.f}, {255, 255, 255, 255}},
7567 {{ 3.0f, 3.0f, 0.f}, { 0, 0, 0, 0}},
7568 {{ 3.0f, 0.0f, 0.f}, {255, 255, 255, 255}},
7569 {{ 1.0f, 0.0f, 0.f}, { 1, 1, 1, 1}},
7571 const DWORD indices16[] = {0, 1, 2, 3, 4, 5};
7572 const DWORD attributes16[] = {0, 0};
7576 const D3DXWELDEPSILONS epsilons16 = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 254.9f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7577 const DWORD adjacency16[] = {-1, 1, -1, -1, -1, 0};
7578 const struct vertex_color_ubyte4 exp_vertices16[] =
7580 {{ 0.0f, 3.0f, 0.f}, {255, 255, 255, 255}},
7581 {{ 2.0f, 3.0f, 0.f}, {255, 255, 255, 255}},
7582 {{ 0.0f, 0.0f, 0.f}, {255, 255, 255, 255}},
7584 {{ 2.0f, 3.0f, 0.f}, { 0, 0, 0, 0}},
7585 {{ 3.0f, 0.0f, 0.f}, {255, 255, 255, 255}},
7587 const DWORD exp_indices16[] = {0, 1, 2, 3, 4, 2};
7588 const DWORD exp_face_remap16[] = {0, 1};
7589 const DWORD exp_vertex_remap16[] = {0, 1, 2, 3, 4, -1};
7592 const struct vertex_texcoord_short2 vertices17[] =
7594 {{ 0.0f, 3.0f, 0.f}, { 0, 0}},
7595 {{ 2.0f, 3.0f, 0.f}, { 0, 0}},
7596 {{ 0.0f, 0.0f, 0.f}, { 0, 0}},
7598 {{ 3.0f, 3.0f, 0.f}, {32767, 32767}},
7599 {{ 3.0f, 0.0f, 0.f}, {0, 0}},
7600 {{ 1.0f, 0.0f, 0.f}, {32766, 32766}},
7602 const DWORD indices17[] = {0, 1, 2, 3, 4, 5};
7603 const DWORD attributes17[] = {0, 0};
7607 const D3DXWELDEPSILONS epsilons17 = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {32766.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7608 const DWORD adjacency17[] = {-1, 1, -1, -1, -1, 0};
7609 const struct vertex_texcoord_short2 exp_vertices17[] =
7611 {{ 0.0f, 3.0f, 0.f}, { 0, 0}},
7612 {{ 2.0f, 3.0f, 0.f}, { 0, 0}},
7613 {{ 0.0f, 0.0f, 0.f}, { 0, 0}},
7615 {{ 2.0f, 3.0f, 0.f}, {32767, 32767}},
7616 {{ 3.0f, 0.0f, 0.f}, {0, 0}},
7618 const DWORD exp_indices17[] = {0, 1, 2, 3, 4, 2};
7619 const DWORD exp_face_remap17[] = {0, 1};
7620 const DWORD exp_vertex_remap17[] = {0, 1, 2, 3, 4, -1};
7623 const struct vertex_texcoord_short2 vertices18[] =
7625 {{ 0.0f, 3.0f, 0.f}, { 0, 0}},
7626 {{ 2.0f, 3.0f, 0.f}, { 0, 0}},
7627 {{ 0.0f, 0.0f, 0.f}, { 0, 0}},
7629 {{ 3.0f, 3.0f, 0.f}, {32767, 32767}},
7630 {{ 3.0f, 0.0f, 0.f}, {0, 0}},
7631 {{ 1.0f, 0.0f, 0.f}, {32766, 32766}},
7633 const DWORD indices18[] = {0, 1, 2, 3, 4, 5};
7634 const DWORD attributes18[] = {0, 0};
7638 const D3DXWELDEPSILONS epsilons18 = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {32766.0f/32767.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7639 const DWORD adjacency18[] = {-1, 1, -1, -1, -1, 0};
7640 const struct vertex_texcoord_short2 exp_vertices18[] =
7642 {{ 0.0f, 3.0f, 0.f}, { 0, 0}},
7643 {{ 2.0f, 3.0f, 0.f}, { 0, 0}},
7644 {{ 0.0f, 0.0f, 0.f}, { 0, 0}},
7646 {{ 2.0f, 3.0f, 0.f}, {32767, 32767}},
7647 {{ 3.0f, 0.0f, 0.f}, {0, 0}},
7649 const DWORD exp_indices18[] = {0, 1, 2, 3, 4, 2};
7650 const DWORD exp_face_remap18[] = {0, 1};
7651 const DWORD exp_vertex_remap18[] = {0, 1, 2, 3, 4, -1};
7654 const struct vertex_texcoord_ushort2n vertices19[] =
7656 {{ 0.0f, 3.0f, 0.f}, { 0, 0}},
7657 {{ 2.0f, 3.0f, 0.f}, { 0, 0}},
7658 {{ 0.0f, 0.0f, 0.f}, { 0, 0}},
7660 {{ 3.0f, 3.0f, 0.f}, {65535, 65535}},
7661 {{ 3.0f, 0.0f, 0.f}, {0, 0}},
7662 {{ 1.0f, 0.0f, 0.f}, {65534, 65534}},
7664 const DWORD indices19[] = {0, 1, 2, 3, 4, 5};
7665 const DWORD attributes19[] = {0, 0};
7669 const D3DXWELDEPSILONS epsilons19 = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {65534.0f/65535.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7670 const DWORD adjacency19[] = {-1, 1, -1, -1, -1, 0};
7671 const struct vertex_texcoord_ushort2n exp_vertices19[] =
7673 {{ 0.0f, 3.0f, 0.f}, { 0, 0}},
7674 {{ 2.0f, 3.0f, 0.f}, { 0, 0}},
7675 {{ 0.0f, 0.0f, 0.f}, { 0, 0}},
7677 {{ 2.0f, 3.0f, 0.f}, {65535, 65535}},
7678 {{ 3.0f, 0.0f, 0.f}, {0, 0}},
7680 const DWORD exp_indices19[] = {0, 1, 2, 3, 4, 2};
7681 const DWORD exp_face_remap19[] = {0, 1};
7682 const DWORD exp_vertex_remap19[] = {0, 1, 2, 3, 4, -1};
7685 const struct vertex_normal_short4 vertices20[] =
7687 {{ 0.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
7688 {{ 2.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
7689 {{ 0.0f, 0.0f, 0.f}, {0, 0, 0, 0}},
7691 {{ 3.0f, 3.0f, 0.f}, {32767, 32767, 32767, 32767}},
7692 {{ 3.0f, 0.0f, 0.f}, {0, 0, 0, 0}},
7693 {{ 1.0f, 0.0f, 0.f}, {32766, 32766, 32766, 32766}},
7695 const DWORD indices20[] = {0, 1, 2, 3, 4, 5};
7696 const DWORD attributes20[] = {0, 0};
7700 const D3DXWELDEPSILONS epsilons20 = {1.0f, 0.0f, 32766.0f, 0.0f, 0.0f, 0.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7701 const DWORD adjacency20[] = {-1, 1, -1, -1, -1, 0};
7702 const struct vertex_normal_short4 exp_vertices20[] =
7704 {{ 0.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
7705 {{ 2.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
7706 {{ 0.0f, 0.0f, 0.f}, {0, 0, 0, 0}},
7708 {{ 2.0f, 3.0f, 0.f}, {32767, 32767, 32767, 32767}},
7709 {{ 3.0f, 0.0f, 0.f}, {0, 0, 0, 0}},
7711 const DWORD exp_indices20[] = {0, 1, 2, 3, 4, 2};
7712 const DWORD exp_face_remap20[] = {0, 1};
7713 const DWORD exp_vertex_remap20[] = {0, 1, 2, 3, 4, -1};
7716 const struct vertex_normal_short4 vertices21[] =
7718 {{ 0.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
7719 {{ 2.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
7720 {{ 0.0f, 0.0f, 0.f}, {0, 0, 0, 0}},
7722 {{ 3.0f, 3.0f, 0.f}, {32767, 32767, 32767, 32767}},
7723 {{ 3.0f, 0.0f, 0.f}, {0, 0, 0, 0}},
7724 {{ 1.0f, 0.0f, 0.f}, {32766, 32766, 32766, 32766}},
7726 const DWORD indices21[] = {0, 1, 2, 3, 4, 5};
7727 const DWORD attributes21[] = {0, 0};
7731 const D3DXWELDEPSILONS epsilons21 = {1.0f, 0.0f, 32766.0f/32767.0f, 0.0f, 0.0f, 0.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7732 const DWORD adjacency21[] = {-1, 1, -1, -1, -1, 0};
7733 const struct vertex_normal_short4 exp_vertices21[] =
7735 {{ 0.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
7736 {{ 2.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
7737 {{ 0.0f, 0.0f, 0.f}, {0, 0, 0, 0}},
7739 {{ 2.0f, 3.0f, 0.f}, {32767, 32767, 32767, 32767}},
7740 {{ 3.0f, 0.0f, 0.f}, {0, 0, 0, 0}},
7742 const DWORD exp_indices21[] = {0, 1, 2, 3, 4, 2};
7743 const DWORD exp_face_remap21[] = {0, 1};
7744 const DWORD exp_vertex_remap21[] = {0, 1, 2, 3, 4, -1};
7747 const struct vertex_normal_short4 vertices22[] =
7749 {{ 0.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
7750 {{ 2.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
7751 {{ 0.0f, 0.0f, 0.f}, {0, 0, 0, 0}},
7753 {{ 3.0f, 3.0f, 0.f}, {-1, -1, -1, -1}},
7754 {{ 3.0f, 0.0f, 0.f}, {0, 0, 0, 0}},
7755 {{ 1.0f, 0.0f, 0.f}, {-2, -2, -2, -2}},
7757 const DWORD indices22[] = {0, 1, 2, 3, 4, 5};
7758 const DWORD attributes22[] = {0, 0};
7762 const D3DXWELDEPSILONS epsilons22 = {1.0f, 0.0f, 65534.0f/65535.0f, 0.0f, 0.0f, 0.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7763 const DWORD adjacency22[] = {-1, 1, -1, -1, -1, 0};
7764 const struct vertex_normal_short4 exp_vertices22[] =
7766 {{ 0.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
7767 {{ 2.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
7768 {{ 0.0f, 0.0f, 0.f}, {0, 0, 0, 0}},
7770 {{ 2.0f, 3.0f, 0.f}, {-1, -1, -1, -1}},
7771 {{ 3.0f, 0.0f, 0.f}, {0, 0, 0, 0}},
7773 const DWORD exp_indices22[] = {0, 1, 2, 3, 4, 2};
7774 const DWORD exp_face_remap22[] = {0, 1};
7775 const DWORD exp_vertex_remap22[] = {0, 1, 2, 3, 4, -1};
7779 const struct vertex_texcoord_float16_2 vertices23[] =
7781 {{ 0.0f, 3.0f, 0.f}, {0x3c00, 0x3c00}},
7782 {{ 2.0f, 3.0f, 0.f}, {0x3800, 0x399a}},
7783 {{ 0.0f, 0.0f, 0.f}, {0xb266, 0xb4cd}},
7785 {{ 3.0f, 3.0f, 0.f}, {0x3266, 0x34cd}},
7786 {{ 3.0f, 0.0f, 0.f}, {0x3c00, 0x3c00}},
7787 {{ 1.0f, 0.0f, 0.f}, {0x2e66, 0x3266}},
7789 const DWORD indices23[] = {0, 1, 2, 3, 4, 5};
7790 const DWORD attributes23[] = {0, 0};
7794 const D3DXWELDEPSILONS epsilons23 = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0.41f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7795 const DWORD adjacency23[] = {-1, 1, -1, -1, -1, 0};
7796 const struct vertex_texcoord_float16_2 exp_vertices23[] =
7798 {{ 0.0f, 3.0f, 0.f}, {0x3c00, 0x3c00}},
7799 {{ 2.0f, 3.0f, 0.f}, {0x3800, 0x399a}},
7800 {{ 0.0f, 0.0f, 0.f}, {0xb266, 0xb4cd}},
7802 {{ 3.0f, 0.0f, 0.f}, {0x3c00, 0x3c00}},
7803 {{ 0.0f, 0.0f, 0.f}, {0x2e66, 0x3266}},
7805 const DWORD exp_indices23[] = {0, 1, 2, 1, 3, 4};
7806 const DWORD exp_face_remap23[] = {0, 1};
7807 const DWORD exp_vertex_remap23[] = {0, 1, 2, 4, 5, -1};
7810 const struct vertex_texcoord_float16_4 vertices24[] =
7812 {{ 0.0f, 3.0f, 0.f}, {0x3c00, 0x3c00, 0x3c00, 0x3c00}},
7813 {{ 2.0f, 3.0f, 0.f}, {0x3800, 0x399a, 0x3800, 0x399a}},
7814 {{ 0.0f, 0.0f, 0.f}, {0xb266, 0xb4cd, 0xb266, 0xb4cd}},
7816 {{ 3.0f, 3.0f, 0.f}, {0x3266, 0x34cd, 0x3266, 0x34cd}},
7817 {{ 3.0f, 0.0f, 0.f}, {0x3c00, 0x3c00, 0x3c00, 0x3c00}},
7818 {{ 1.0f, 0.0f, 0.f}, {0x2e66, 0x3266, 0x2e66, 0x3266}},
7820 const DWORD indices24[] = {0, 1, 2, 3, 4, 5};
7821 const DWORD attributes24[] = {0, 0};
7825 const D3DXWELDEPSILONS epsilons24 = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0.41f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7826 const DWORD adjacency24[] = {-1, 1, -1, -1, -1, 0};
7827 const struct vertex_texcoord_float16_4 exp_vertices24[] =
7829 {{ 0.0f, 3.0f, 0.f}, {0x3c00, 0x3c00, 0x3c00, 0x3c00}},
7830 {{ 2.0f, 3.0f, 0.f}, {0x3800, 0x399a, 0x3800, 0x399a}},
7831 {{ 0.0f, 0.0f, 0.f}, {0xb266, 0xb4cd, 0xb266, 0xb4cd}},
7833 {{ 3.0f, 0.0f, 0.f}, {0x3c00, 0x3c00, 0x3c00, 0x3c00}},
7834 {{ 0.0f, 0.0f, 0.f}, {0x2e66, 0x3266, 0x2e66, 0x3266}},
7836 const DWORD exp_indices24[] = {0, 1, 2, 1, 3, 4};
7837 const DWORD exp_face_remap24[] = {0, 1};
7838 const DWORD exp_vertex_remap24[] = {0, 1, 2, 4, 5, -1};
7843 const struct vertex_texcoord vertices25[] =
7845 {{ 0.0f, 3.0f, 0.f}, {1.0f, 1.0f}},
7846 {{ 2.0f, 3.0f, 0.f}, {0.5f, 0.7f}},
7847 {{ 0.0f, 0.0f, 0.f}, {-0.2f, -0.3f}},
7849 {{ 3.0f, 3.0f, 0.f}, {0.2f, 0.3f}},
7850 {{ 3.0f, 0.0f, 0.f}, {1.0f, 1.0f}},
7851 {{ 1.0f, 0.0f, 0.f}, {0.1f, 0.2f}}
7853 const DWORD indices25[] = {0, 1, 2, 3, 4, 5};
7854 const DWORD attributes25[] = {0, 0};
7858 const D3DXWELDEPSILONS epsilons25 = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.4f +
FLT_EPSILON}, 0.0f, 0.0f, 0.0f};
7859 const DWORD adjacency25[] = {-1, 1, -1, -1, -1, 0};
7860 const struct vertex_texcoord exp_vertices25[] =
7862 {{ 0.0f, 3.0f, 0.f}, {1.0f, 1.0f}},
7863 {{ 2.0f, 3.0f, 0.f}, {0.5f, 0.7f}},
7864 {{ 0.0f, 0.0f, 0.f}, {-0.2f, -0.3f}},
7866 {{ 3.0f, 0.0f, 0.f}, {1.0f, 1.0f}},
7867 {{ 0.0f, 0.0f, 0.f}, {0.1f, 0.2f}},
7869 const DWORD exp_indices25[] = {0, 1, 2, 1, 3, 4};
7870 const DWORD exp_face_remap25[] = {0, 1};
7871 const DWORD exp_vertex_remap25[] = {0, 1, 2, 4, 5, -1};
7875 const struct vertex_color vertices26[] =
7877 {{ 0.0f, 3.0f, 0.f}, 0xFFFFFFFF},
7878 {{ 2.0f, 3.0f, 0.f}, 0xFFFFFFFF},
7879 {{ 0.0f, 0.0f, 0.f}, 0xFFFFFFFF},
7881 {{ 3.0f, 3.0f, 0.f}, 0x00000000},
7882 {{ 3.0f, 0.0f, 0.f}, 0xFFFFFFFF},
7883 {{ 1.0f, 0.0f, 0.f}, 0x01010101},
7885 const DWORD indices26[] = {0, 1, 2, 3, 4, 5};
7886 const DWORD attributes26[] = {0, 0};
7890 const D3DXWELDEPSILONS epsilons26 = {1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, {1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f}, 1.0f, 1.0f, 1.0f};
7891 const DWORD adjacency26[] = {-1, 1, -1, -1, -1, 0};
7892 const struct vertex_color exp_vertices26[] =
7894 {{ 0.0f, 3.0f, 0.f}, 0xFFFFFFFF},
7895 {{ 2.0f, 3.0f, 0.f}, 0xFFFFFFFF},
7896 {{ 0.0f, 0.0f, 0.f}, 0xFFFFFFFF},
7898 {{ 2.0f, 3.0f, 0.f}, 0x00000000},
7899 {{ 3.0f, 0.0f, 0.f}, 0xFFFFFFFF},
7900 {{ 0.0f, 0.0f, 0.f}, 0x01010101},
7902 const DWORD exp_indices26[] = {0, 1, 2, 3, 4, 5};
7903 const DWORD exp_face_remap26[] = {0, 1};
7904 const DWORD exp_vertex_remap26[] = {0, 1, 2, 3, 4, 5};
7910 const struct vertex_color vertices27[] =
7912 {{ 0.0f, 3.0f, 0.0f}, 0x00000000},
7913 {{ 2.0f, 3.0f, 0.0f}, 0x10203040},
7914 {{ 0.0f, 0.0f, 0.0f}, 0x50607080},
7916 {{ 3.0f, 3.0f, 0.0f}, 0x11213141},
7917 {{ 3.0f, 0.0f, 0.0f}, 0xffffffff},
7918 {{ 1.0f, 0.0f, 0.0f}, 0x51617181},
7920 const DWORD indices27[] = {0, 1, 2, 3, 4, 5};
7921 const DWORD attributes27[] = {0, 0};
7927 1.1f, 0.0f, 0.0f, 0.0f, 2.0f / 255.0f, 0.0f,
7928 {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f
7930 const DWORD adjacency27[] = {-1, 1, -1, -1, -1, 0};
7931 const struct vertex_color exp_vertices27[] =
7933 {{ 0.0f, 3.0f, 0.0f}, 0x00000000},
7934 {{ 2.0f, 3.0f, 0.0f}, 0x10203040},
7935 {{ 0.0f, 0.0f, 0.0f}, 0x50607080},
7937 {{ 3.0f, 0.0f, 0.0f}, 0xffffffff},
7939 const DWORD exp_indices27[] = {0, 1, 2, 1, 3, 2};
7940 const DWORD exp_face_remap27[] = {0, 1};
7941 const DWORD exp_vertex_remap27[] = {0, 1, 2, 4, -1, -1};
7947 const struct vertex_normal_udec3 vertices28[] =
7949 {{ 0.0f, 3.0f, 0.f}, dword_udec3_zero},
7950 {{ 2.0f, 3.0f, 0.f}, dword_udec3_zero},
7951 {{ 0.0f, 0.0f, 0.f}, dword_udec3_zero},
7953 {{ 3.0f, 3.0f, 0.f}, dword_udec3_1023},
7954 {{ 3.0f, 0.0f, 0.f}, dword_udec3_zero},
7955 {{ 1.0f, 0.0f, 0.f}, dword_udec3_1022},
7957 const DWORD indices28[] = {0, 1, 2, 3, 4, 5};
7958 const DWORD attributes28[] = {0, 0};
7962 const D3DXWELDEPSILONS epsilons28 = {1.0f, 0.0f, 1022.0f, 0.0f, 0.0f, 0.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, 0.0f, 0.0f, 0.0f};
7963 const DWORD adjacency28[] = {-1, 1, -1, -1, -1, 0};
7964 const struct vertex_normal_udec3 exp_vertices28[] =
7966 {{ 0.0f, 3.0f, 0.f}, dword_udec3_zero},
7967 {{ 2.0f, 3.0f, 0.f}, dword_udec3_zero},
7968 {{ 0.0f, 0.0f, 0.f}, dword_udec3_zero},
7970 {{ 2.0f, 3.0f, 0.f}, dword_udec3_1023},
7971 {{ 3.0f, 0.0f, 0.f}, dword_udec3_zero},
7973 const DWORD exp_indices28[] = {0, 1, 2, 3, 4, 2};
7974 const DWORD exp_face_remap28[] = {0, 1};
7975 const DWORD exp_vertex_remap28[] = {0, 1, 2, 3, 4, -1};
7981 const struct vertex_normal_dec3n vertices29[] =
7983 {{ 0.0f, 3.0f, 0.f}, dword_dec3n_zero},
7984 {{ 2.0f, 3.0f, 0.f}, dword_dec3n_zero},
7985 {{ 0.0f, 0.0f, 0.f}, dword_dec3n_zero},
7987 {{ 3.0f, 3.0f, 0.f}, dword_dec3n_511},
7988 {{ 3.0f, 0.0f, 0.f}, dword_dec3n_zero},
7989 {{ 1.0f, 0.0f, 0.f}, dword_dec3n_510},
7991 const DWORD indices29[] = {0, 1, 2, 3, 4, 5};
7992 const DWORD attributes29[] = {0, 0};
7996 const D3DXWELDEPSILONS epsilons29 = {1.0f, 0.0f, 510.0f/511.0f, 0.0f, 0.0f, 0.0f, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, .0f}, 0.0f, 0.0f, 0.0f};
7997 const DWORD adjacency29[] = {-1, 1, -1, -1, -1, 0};
7998 const struct vertex_normal_dec3n exp_vertices29[] =
8000 {{ 0.0f, 3.0f, 0.f}, dword_dec3n_zero},
8001 {{ 2.0f, 3.0f, 0.f}, dword_dec3n_zero},
8002 {{ 0.0f, 0.0f, 0.f}, dword_dec3n_zero},
8004 {{ 2.0f, 3.0f, 0.f}, dword_dec3n_511},
8005 {{ 3.0f, 0.0f, 0.f}, dword_dec3n_zero},
8007 const DWORD exp_indices29[] = {0, 1, 2, 3, 4, 2};
8008 const DWORD exp_face_remap29[] = {0, 1};
8009 const DWORD exp_vertex_remap29[] = {0, 1, 2, 3, 4, -1};
8018 const BYTE *vertices;
8021 const DWORD num_vertices;
8022 const DWORD num_faces;
8025 const UINT vertex_size;
8028 const DWORD *adjacency;
8029 const BYTE *exp_vertices;
8030 const DWORD *exp_indices;
8031 const DWORD *exp_face_remap;
8032 const DWORD *exp_vertex_remap;
8033 const DWORD exp_new_num_vertices;
8049 (
BYTE*)exp_vertices0,
8053 exp_new_num_vertices0
8067 (
BYTE*)exp_vertices1,
8071 exp_new_num_vertices1
8085 (
BYTE*)exp_vertices2,
8089 exp_new_num_vertices2
8103 (
BYTE*)exp_vertices3,
8107 exp_new_num_vertices3
8121 (
BYTE*)exp_vertices4,
8125 exp_new_num_vertices4
8140 (
BYTE*)exp_vertices5,
8144 exp_new_num_vertices5
8158 (
BYTE*)exp_vertices6,
8162 exp_new_num_vertices6
8166 (
DWORD*)indices6_16bit,
8176 (
BYTE*)exp_vertices6,
8180 exp_new_num_vertices6
8194 (
BYTE*)exp_vertices8,
8198 exp_new_num_vertices8
8212 (
BYTE*)exp_vertices9,
8216 exp_new_num_vertices9
8225 declaration_blendweight,
8226 vertex_size_blendweight,
8230 (
BYTE*)exp_vertices10,
8234 exp_new_num_vertices10
8243 declaration_texcoord,
8244 vertex_size_texcoord,
8248 (
BYTE*)exp_vertices11,
8252 exp_new_num_vertices11
8266 (
BYTE*)exp_vertices12,
8270 exp_new_num_vertices12
8279 declaration_normal3,
8284 (
BYTE*)exp_vertices13,
8288 exp_new_num_vertices13
8302 (
BYTE*)exp_vertices14,
8306 exp_new_num_vertices14
8315 declaration_color_ubyte4n,
8316 vertex_size_color_ubyte4,
8320 (
BYTE*)exp_vertices15,
8324 exp_new_num_vertices15
8333 declaration_color_ubyte4,
8334 vertex_size_color_ubyte4,
8338 (
BYTE*)exp_vertices16,
8342 exp_new_num_vertices16
8351 declaration_texcoord_short2,
8352 vertex_size_texcoord_short2,
8356 (
BYTE*)exp_vertices17,
8360 exp_new_num_vertices17
8369 declaration_texcoord_short2n,
8370 vertex_size_texcoord_short2,
8374 (
BYTE*)exp_vertices18,
8378 exp_new_num_vertices18
8387 declaration_texcoord_ushort2n,
8388 vertex_size_texcoord_short2,
8392 (
BYTE*)exp_vertices19,
8396 exp_new_num_vertices19
8405 declaration_normal_short4,
8406 vertex_size_normal_short4,
8410 (
BYTE*)exp_vertices20,
8414 exp_new_num_vertices20
8423 declaration_normal_short4n,
8424 vertex_size_normal_short4,
8428 (
BYTE*)exp_vertices21,
8432 exp_new_num_vertices21
8441 declaration_normal_ushort4n,
8442 vertex_size_normal_short4,
8446 (
BYTE*)exp_vertices22,
8450 exp_new_num_vertices22
8459 declaration_texcoord_float16_2,
8460 vertex_size_texcoord_float16_2,
8464 (
BYTE*)exp_vertices23,
8468 exp_new_num_vertices23
8477 declaration_texcoord_float16_4,
8478 vertex_size_texcoord_float16_4,
8482 (
BYTE*)exp_vertices24,
8486 exp_new_num_vertices24
8495 declaration_texcoord10,
8496 vertex_size_texcoord,
8500 (
BYTE*)exp_vertices25,
8504 exp_new_num_vertices25
8518 (
BYTE*)exp_vertices26,
8522 exp_new_num_vertices26
8536 (
BYTE*)exp_vertices27,
8540 exp_new_num_vertices27
8549 declaration_normal_udec3,
8550 vertex_size_normal_udec3,
8554 (
BYTE*)exp_vertices28,
8558 exp_new_num_vertices28
8567 declaration_normal_dec3n,
8568 vertex_size_normal_dec3n,
8572 (
BYTE*)exp_vertices29,
8576 exp_new_num_vertices29
8583 skip(
"Couldn't create test context\n");
8590 DWORD *vertex_remap_ptr;
8591 DWORD new_num_vertices;
8596 tc[
i].indices,
tc[
i].attributes);
8599 skip(
"Couldn't initialize test mesh %ld.\n",
i);
8604 adjacency_out =
malloc(VERTS_PER_FACE *
tc[
i].num_faces *
sizeof(*adjacency_out));
8607 skip(
"Couldn't allocate adjacency_out array.\n");
8610 face_remap =
malloc(
tc[
i].num_faces *
sizeof(*face_remap));
8613 skip(
"Couldn't allocate face_remap array.\n");
8618 adjacency_out, face_remap, &vertex_remap);
8621 new_num_vertices =
mesh->lpVtbl->GetNumVertices(
mesh);
8622 ok(new_num_vertices ==
tc[
i].exp_new_num_vertices,
8623 "Mesh %ld: new_num_vertices == %ld, expected %ld.\n",
8624 i, new_num_vertices,
tc[
i].exp_new_num_vertices);
8631 skip(
"Couldn't lock index buffer.\n");
8634 for (
j = 0;
j < VERTS_PER_FACE *
tc[
i].num_faces;
j++)
8637 "Mesh %ld: indices[%ld] == %ld, expected %ld\n",
8643 hr =
mesh->lpVtbl->LockIndexBuffer(
mesh, 0, (
void**)&indices_16bit);
8646 skip(
"Couldn't lock index buffer.\n");
8649 for (
j = 0;
j < VERTS_PER_FACE *
tc[
i].num_faces;
j++)
8651 ok(indices_16bit[
j] ==
tc[
i].exp_indices[
j],
8652 "Mesh %ld: indices_16bit[%ld] == %d, expected %ld\n",
8653 i,
j, indices_16bit[
j],
tc[
i].exp_indices[
j]);
8656 mesh->lpVtbl->UnlockIndexBuffer(
mesh);
8658 indices_16bit =
NULL;
8660 for (
j = 0;
j < VERTS_PER_FACE *
tc[
i].num_faces;
j++)
8662 ok(adjacency_out[
j] ==
tc[
i].adjacency[
j],
8663 "Mesh %ld: adjacency_out[%ld] == %ld, expected %ld\n",
8664 i,
j, adjacency_out[
j],
tc[
i].adjacency[
j]);
8667 for (
j = 0;
j <
tc[
i].num_faces;
j++)
8669 ok(face_remap[
j] ==
tc[
i].exp_face_remap[
j],
8670 "Mesh %ld: face_remap[%ld] == %ld, expected %ld\n",
8671 i,
j, face_remap[
j],
tc[
i].exp_face_remap[
j]);
8674 vertex_remap_ptr = vertex_remap->lpVtbl->GetBufferPointer(vertex_remap);
8675 for (
j = 0;
j < VERTS_PER_FACE *
tc[
i].num_faces;
j++)
8677 ok(vertex_remap_ptr[
j] ==
tc[
i].exp_vertex_remap[
j],
8678 "Mesh %ld: vertex_remap_ptr[%ld] == %ld, expected %ld\n",
8679 i,
j, vertex_remap_ptr[
j],
tc[
i].exp_vertex_remap[
j]);
8682 hr =
mesh->lpVtbl->LockVertexBuffer(
mesh, 0, (
void*)&vertices);
8685 skip(
"Couldn't lock vertex buffer.\n");
8689 for (
j = 0;
j <
tc[
i].exp_new_num_vertices;
j++)
8694 mesh->lpVtbl->UnlockVertexBuffer(
mesh);
8698 free(adjacency_out);
8699 adjacency_out =
NULL;
8702 vertex_remap->lpVtbl->Release(vertex_remap);
8703 vertex_remap =
NULL;
8709 free(adjacency_out);
8712 if (indices_16bit)
mesh->lpVtbl->UnlockIndexBuffer(
mesh);
8714 if (vertex_remap) vertex_remap->lpVtbl->Release(vertex_remap);
8715 if (vertices)
mesh->lpVtbl->UnlockVertexBuffer(
mesh);
8847 const unsigned int VERTS_PER_FACE = 3;
8872 struct vertex_ptc_float16_2
8877 struct vertex_ptc_float16_4
8882 struct vertex_ptc_float1
8887 struct vertex_ptc_float3
8892 struct vertex_ptc_float4
8897 struct vertex_ptc_d3dcolor
8902 struct vertex_ptc_ubyte4
8907 struct vertex_ptc_ubyte4n
8912 struct vertex_ptc_short2
8917 struct vertex_ptc_short4
8922 struct vertex_ptc_ushort2n
8927 struct vertex_ptc_ushort4n
8932 struct vertex_ptc_udec3
8937 struct vertex_ptc_dec3n
8952 const struct vertex_pn vertices0[] =
8954 {{ 0.0f, 3.0f, 0.f},
up},
8955 {{ 2.0f, 3.0f, 0.f},
up},
8956 {{ 0.0f, 0.0f, 0.f},
up},
8958 {{ 3.0f, 3.0f, 0.f},
up},
8959 {{ 3.0f, 0.0f, 0.f},
up},
8960 {{ 1.0f, 0.0f, 0.f},
up},
8964 const UINT vertex_size0 =
sizeof(*vertices0);
8970 const struct vertex_pntc exp_vertices2[] =
8972 {{ 0.0f, 3.0f, 0.f},
up, zero_vec2},
8973 {{ 2.0f, 3.0f, 0.f},
up, zero_vec2},
8974 {{ 0.0f, 0.0f, 0.f},
up, zero_vec2},
8976 {{ 3.0f, 3.0f, 0.f},
up, zero_vec2},
8977 {{ 3.0f, 0.0f, 0.f},
up, zero_vec2},
8978 {{ 1.0f, 0.0f, 0.f},
up, zero_vec2},
8980 const UINT exp_vertex_size2 =
sizeof(*exp_vertices2);
8985 const struct vertex_ptcn exp_vertices3[] =
8987 {{ 0.0f, 3.0f, 0.f}, zero_vec2,
up},
8988 {{ 2.0f, 3.0f, 0.f}, zero_vec2,
up},
8989 {{ 0.0f, 0.0f, 0.f}, zero_vec2,
up},
8991 {{ 3.0f, 3.0f, 0.f}, zero_vec2,
up},
8992 {{ 3.0f, 0.0f, 0.f}, zero_vec2,
up},
8993 {{ 1.0f, 0.0f, 0.f}, zero_vec2,
up},
8995 const UINT exp_vertex_size3 =
sizeof(*exp_vertices3);
8997 const struct vertex_ptc vertices4[] =
8999 {{ 0.0f, 3.0f, 0.f}, { 1.0f, 1.0f}},
9000 {{ 2.0f, 3.0f, 0.f}, { 0.5f, 0.7f}},
9001 {{ 0.0f, 0.0f, 0.f}, {-0.2f, -0.3f}},
9003 {{ 3.0f, 3.0f, 0.f}, { 0.2f, 0.3f}},
9004 {{ 3.0f, 0.0f, 0.f}, { 1.0f, 1.0f}},
9005 {{ 1.0f, 0.0f, 0.f}, { 0.1f, 0.2f}},
9009 const UINT vertex_size4 =
sizeof(*vertices4);
9010 const struct vertex_ptc_float16_2 exp_vertices4[] =
9012 {{ 0.0f, 3.0f, 0.f}, {0x3c00, 0x3c00}},
9013 {{ 2.0f, 3.0f, 0.f}, {0x3800, 0x399a}},
9014 {{ 0.0f, 0.0f, 0.f}, {0xb266, 0xb4cd}},
9016 {{ 3.0f, 3.0f, 0.f}, {0x3266, 0x34cd}},
9017 {{ 3.0f, 0.0f, 0.f}, {0x3c00, 0x3c00}},
9018 {{ 1.0f, 0.0f, 0.f}, {0x2e66, 0x3266}},
9020 const UINT exp_vertex_size4 =
sizeof(*exp_vertices4);
9022 const struct vertex_ptc vertices5[] =
9024 {{ 0.0f, 3.0f, 0.f}, { 1.0f, 1.0f}},
9025 {{ 2.0f, 3.0f, 0.f}, { 0.5f, 0.7f}},
9026 {{ 0.0f, 0.0f, 0.f}, {-0.2f, -0.3f}},
9028 {{ 3.0f, 3.0f, 0.f}, { 0.2f, 0.3f}},
9029 {{ 3.0f, 0.0f, 0.f}, { 1.0f, 1.0f}},
9030 {{ 1.0f, 0.0f, 0.f}, { 0.1f, 0.2f}},
9034 const UINT vertex_size5 =
sizeof(*vertices5);
9035 const struct vertex_ptc_float16_4 exp_vertices5[] =
9037 {{ 0.0f, 3.0f, 0.f}, {0x3c00, 0x3c00, 0, 0x3c00}},
9038 {{ 2.0f, 3.0f, 0.f}, {0x3800, 0x399a, 0, 0x3c00}},
9039 {{ 0.0f, 0.0f, 0.f}, {0xb266, 0xb4cd, 0, 0x3c00}},
9041 {{ 3.0f, 3.0f, 0.f}, {0x3266, 0x34cd, 0, 0x3c00}},
9042 {{ 3.0f, 0.0f, 0.f}, {0x3c00, 0x3c00, 0, 0x3c00}},
9043 {{ 1.0f, 0.0f, 0.f}, {0x2e66, 0x3266, 0, 0x3c00}},
9045 const UINT exp_vertex_size5 =
sizeof(*exp_vertices5);
9047 const struct vertex_ptc vertices6[] =
9049 {{ 0.0f, 3.0f, 0.f}, { 1.0f, 1.0f}},
9050 {{ 2.0f, 3.0f, 0.f}, { 0.5f, 0.7f}},
9051 {{ 0.0f, 0.0f, 0.f}, {-0.2f, -0.3f}},
9053 {{ 3.0f, 3.0f, 0.f}, { 0.2f, 0.3f}},
9054 {{ 3.0f, 0.0f, 0.f}, { 1.0f, 1.0f}},
9055 {{ 1.0f, 0.0f, 0.f}, { 0.1f, 0.2f}},
9059 const UINT vertex_size6 =
sizeof(*vertices6);
9060 const struct vertex_ptc_float1 exp_vertices6[] =
9062 {{ 0.0f, 3.0f, 0.f}, 1.0f},
9063 {{ 2.0f, 3.0f, 0.f}, 0.5f},
9064 {{ 0.0f, 0.0f, 0.f}, -0.2f},
9066 {{ 3.0f, 3.0f, 0.f}, 0.2f},
9067 {{ 3.0f, 0.0f, 0.f}, 1.0f},
9068 {{ 1.0f, 0.0f, 0.f}, 0.1f},
9070 const UINT exp_vertex_size6 =
sizeof(*exp_vertices6);
9072 const struct vertex_ptc vertices7[] =
9074 {{ 0.0f, 3.0f, 0.f}, { 1.0f, 1.0f}},
9075 {{ 2.0f, 3.0f, 0.f}, { 0.5f, 0.7f}},
9076 {{ 0.0f, 0.0f, 0.f}, {-0.2f, -0.3f}},
9078 {{ 3.0f, 3.0f, 0.f}, { 0.2f, 0.3f}},
9079 {{ 3.0f, 0.0f, 0.f}, { 1.0f, 1.0f}},
9080 {{ 1.0f, 0.0f, 0.f}, { 0.1f, 0.2f}},
9084 const UINT vertex_size7 =
sizeof(*vertices7);
9085 const struct vertex_ptc_float3 exp_vertices7[] =
9087 {{ 0.0f, 3.0f, 0.f}, { 1.0f, 1.0f, 0.0f}},
9088 {{ 2.0f, 3.0f, 0.f}, { 0.5f, 0.7f, 0.0f}},
9089 {{ 0.0f, 0.0f, 0.f}, {-0.2f, -0.3f, 0.0f}},
9091 {{ 3.0f, 3.0f, 0.f}, { 0.2f, 0.3f, 0.0f}},
9092 {{ 3.0f, 0.0f, 0.f}, { 1.0f, 1.0f, 0.0f}},
9093 {{ 1.0f, 0.0f, 0.f}, { 0.1f, 0.2f, 0.0f}},
9095 const UINT exp_vertex_size7 =
sizeof(*exp_vertices7);
9097 const struct vertex_ptc vertices8[] =
9099 {{ 0.0f, 3.0f, 0.f}, { 1.0f, 1.0f}},
9100 {{ 2.0f, 3.0f, 0.f}, { 0.5f, 0.7f}},
9101 {{ 0.0f, 0.0f, 0.f}, {-0.2f, -0.3f}},
9103 {{ 3.0f, 3.0f, 0.f}, { 0.2f, 0.3f}},
9104 {{ 3.0f, 0.0f, 0.f}, { 1.0f, 1.0f}},
9105 {{ 1.0f, 0.0f, 0.f}, { 0.1f, 0.2f}},
9109 const UINT vertex_size8 =
sizeof(*vertices8);
9110 const struct vertex_ptc_float4 exp_vertices8[] =
9112 {{ 0.0f, 3.0f, 0.f}, { 1.0f, 1.0f, 0.0f, 1.0f}},
9113 {{ 2.0f, 3.0f, 0.f}, { 0.5f, 0.7f, 0.0f, 1.0f}},
9114 {{ 0.0f, 0.0f, 0.f}, {-0.2f, -0.3f, 0.0f, 1.0f}},
9116 {{ 3.0f, 3.0f, 0.f}, { 0.2f, 0.3f, 0.0f, 1.0f}},
9117 {{ 3.0f, 0.0f, 0.f}, { 1.0f, 1.0f, 0.0f, 1.0f}},
9118 {{ 1.0f, 0.0f, 0.f}, { 0.1f, 0.2f, 0.0f, 1.0f}},
9120 const UINT exp_vertex_size8 =
sizeof(*exp_vertices8);
9122 const struct vertex_ptc vertices9[] =
9124 {{ 0.0f, 3.0f, 0.f}, { 1.0f, 1.0f}},
9125 {{ 2.0f, 3.0f, 0.f}, { 0.5f, 0.7f}},
9126 {{ 0.0f, 0.0f, 0.f}, {-0.4f, -0.6f}},
9128 {{ 3.0f, 3.0f, 0.f}, { 0.2f, 0.3f}},
9129 {{ 3.0f, 0.0f, 0.f}, { 2.0f, 256.0f}},
9130 {{ 1.0f, 0.0f, 0.f}, { 0.11f, 0.2f}},
9134 const UINT vertex_size9 =
sizeof(*vertices9);
9135 const struct vertex_ptc_d3dcolor exp_vertices9[] =
9137 {{ 0.0f, 3.0f, 0.f}, {0, 255, 255, 255}},
9138 {{ 2.0f, 3.0f, 0.f}, {0, 179, 128, 255}},
9139 {{ 0.0f, 0.0f, 0.f}, {0, 0, 0, 255}},
9141 {{ 3.0f, 3.0f, 0.f}, {0, 77, 51, 255}},
9142 {{ 3.0f, 0.0f, 0.f}, {0, 255, 255, 255}},
9143 {{ 1.0f, 0.0f, 0.f}, {0, 51, 28, 255}},
9145 const UINT exp_vertex_size9 =
sizeof(*exp_vertices9);
9147 const struct vertex_ptc vertices10[] =
9149 {{ 0.0f, 3.0f, 0.f}, { 0.0f, 1.0f}},
9150 {{ 2.0f, 3.0f, 0.f}, { 2.0f, 3.0f}},
9151 {{ 0.0f, 0.0f, 0.f}, { 254.0f, 255.0f}},
9153 {{ 3.0f, 3.0f, 0.f}, { 256.0f, 257.0f}},
9154 {{ 3.0f, 0.0f, 0.f}, { 1.4f, 1.5f}},
9155 {{ 1.0f, 0.0f, 0.f}, {-4.0f, -5.0f}},
9158 const UINT num_faces10 =
ARRAY_SIZE(vertices10) / VERTS_PER_FACE;
9159 const UINT vertex_size10 =
sizeof(*vertices10);
9160 const struct vertex_ptc_ubyte4 exp_vertices10[] =
9162 {{ 0.0f, 3.0f, 0.f}, {0, 1, 0, 1}},
9163 {{ 2.0f, 3.0f, 0.f}, {2, 3, 0, 1}},
9164 {{ 0.0f, 0.0f, 0.f}, {254, 255, 0, 1}},
9166 {{ 3.0f, 3.0f, 0.f}, {0, 1, 0, 1}},
9167 {{ 3.0f, 0.0f, 0.f}, {1, 2, 0, 1}},
9168 {{ 1.0f, 0.0f, 0.f}, {0, 0, 0, 1}},
9170 const UINT exp_vertex_size10 =
sizeof(*exp_vertices10);
9172 const struct vertex_ptc vertices11[] =
9174 {{ 0.0f, 3.0f, 0.f}, { 1.0f, -1.0f}},
9175 {{ 2.0f, 3.0f, 0.f}, { 0.4f, 0.5f}},
9176 {{ 0.0f, 0.0f, 0.f}, {-0.5f, -5.0f}},
9187 const UINT num_faces11 =
ARRAY_SIZE(vertices11) / VERTS_PER_FACE;
9188 const UINT vertex_size11 =
sizeof(*vertices11);
9189 const struct vertex_ptc_short2 exp_vertices11[] =
9191 {{ 0.0f, 3.0f, 0.f}, {1, 0}},
9192 {{ 2.0f, 3.0f, 0.f}, {0, 1}},
9193 {{ 0.0f, 0.0f, 0.f}, {0, -4}},
9199 {{ 4.0f, 3.0f, 0.f}, {-2, 1}},
9200 {{ 6.0f, 0.0f, 0.f}, {32765, -32767}},
9201 {{ 4.0f, 0.0f, 0.f}, {-4, 1}},
9203 const UINT exp_vertex_size11 =
sizeof(*exp_vertices11);
9205 const struct vertex_ptc vertices12[] =
9207 {{ 0.0f, 3.0f, 0.f}, { 1.0f, -1.0f}},
9208 {{ 2.0f, 3.0f, 0.f}, { 0.4f, 0.5f}},
9209 {{ 0.0f, 0.0f, 0.f}, {-0.5f, -5.0f}},
9220 const UINT num_faces12 =
ARRAY_SIZE(vertices12) / VERTS_PER_FACE;
9221 const UINT vertex_size12 =
sizeof(*vertices12);
9222 const struct vertex_ptc_short4 exp_vertices12[] =
9224 {{ 0.0f, 3.0f, 0.f}, {1, 0, 0, 1}},
9225 {{ 2.0f, 3.0f, 0.f}, {0, 1, 0, 1}},
9226 {{ 0.0f, 0.0f, 0.f}, {0, -4, 0, 1}},
9232 {{ 4.0f, 3.0f, 0.f}, {-2, 1, 0, 1}},
9233 {{ 6.0f, 0.0f, 0.f}, {32765, -32767, 0, 1}},
9234 {{ 4.0f, 0.0f, 0.f}, {-4, 1, 0, 1}},
9236 const UINT exp_vertex_size12 =
sizeof(*exp_vertices12);
9238 const struct vertex_ptc vertices13[] =
9240 {{ 0.0f, 3.0f, 0.f}, { 1.0f, 2.0f}},
9241 {{ 2.0f, 3.0f, 0.f}, { 0.5f, 0.7f}},
9242 {{ 0.0f, 0.0f, 0.f}, {-0.4f, -0.5f}},
9244 {{ 3.0f, 3.0f, 0.f}, {-0.6f, -1.0f}},
9249 const UINT num_faces13 =
ARRAY_SIZE(vertices13) / VERTS_PER_FACE;
9250 const UINT vertex_size13 =
sizeof(*vertices13);
9251 const struct vertex_ptc_ubyte4n exp_vertices13[] =
9253 {{ 0.0f, 3.0f, 0.f}, {255, 255, 0, 255}},
9254 {{ 2.0f, 3.0f, 0.f}, {128, 179, 0, 255}},
9255 {{ 0.0f, 0.0f, 0.f}, {0, 0, 0, 255}},
9257 {{ 3.0f, 3.0f, 0.f}, {0, 0, 0, 255}},
9258 {{ 3.0f, 0.0f, 0.f}, {255, 255, 0, 255}},
9259 {{ 1.0f, 0.0f, 0.f}, {255, 0, 0, 255}},
9261 const UINT exp_vertex_size13 =
sizeof(*exp_vertices13);
9263 const struct vertex_ptc vertices14[] =
9265 {{ 0.0f, 3.0f, 0.f}, {1.0f, 2.0f}},
9266 {{ 2.0f, 3.0f, 0.f}, {0.4f, 0.5f}},
9267 {{ 0.0f, 0.0f, 0.f}, {0.6f, -1.0f}},
9269 {{ 3.0f, 3.0f, 0.f}, {-0.4f, -0.5f}},
9270 {{ 3.0f, 0.0f, 0.f}, {-0.9f, -0.99997}},
9274 const UINT num_faces14 =
ARRAY_SIZE(vertices14) / VERTS_PER_FACE;
9275 const UINT vertex_size14 =
sizeof(*vertices14);
9276 const struct vertex_ptc_short2 exp_vertices14[] =
9279 {{ 2.0f, 3.0f, 0.f}, {13107, 16384}},
9280 {{ 0.0f, 0.0f, 0.f}, {19660,
SHRT_MIN + 2}},
9282 {{ 3.0f, 3.0f, 0.f}, {-13106, -16383}},
9283 {{ 3.0f, 0.0f, 0.f}, {-29489,
SHRT_MIN + 3}},
9286 const UINT exp_vertex_size14 =
sizeof(*exp_vertices14);
9288 const struct vertex_ptc vertices15[] =
9290 {{ 0.0f, 3.0f, 0.f}, {1.0f, 2.0f}},
9291 {{ 2.0f, 3.0f, 0.f}, {0.4f, 0.5f}},
9292 {{ 0.0f, 0.0f, 0.f}, {0.6f, -1.0f}},
9294 {{ 3.0f, 3.0f, 0.f}, {-0.4f, -0.5f}},
9295 {{ 3.0f, 0.0f, 0.f}, {-0.9f, -0.99997}},
9299 const UINT num_faces15 =
ARRAY_SIZE(vertices15) / VERTS_PER_FACE;
9300 const UINT vertex_size15 =
sizeof(*vertices15);
9301 const struct vertex_ptc_short4 exp_vertices15[] =
9304 {{ 2.0f, 3.0f, 0.f}, {13107, 16384, 0,
SHRT_MAX}},
9307 {{ 3.0f, 3.0f, 0.f}, {-13106, -16383, 0,
SHRT_MAX}},
9311 const UINT exp_vertex_size15 =
sizeof(*exp_vertices15);
9313 const struct vertex_ptc vertices16[] =
9315 {{ 0.0f, 3.0f, 0.f}, {1.0f, 2.0f}},
9316 {{ 2.0f, 3.0f, 0.f}, {0.4f, 0.5f}},
9317 {{ 0.0f, 0.0f, 0.f}, {0.6f, -1.0f}},
9319 {{ 3.0f, 3.0f, 0.f}, {-0.4f, -0.5f}},
9320 {{ 3.0f, 0.0f, 0.f}, {-0.9f, 0.99998f}},
9321 {{ 1.0f, 0.0f, 0.f}, {
USHRT_MAX, 0.0f}},
9324 const UINT num_faces16 =
ARRAY_SIZE(vertices16) / VERTS_PER_FACE;
9325 const UINT vertex_size16 =
sizeof(*vertices16);
9326 const struct vertex_ptc_ushort2n exp_vertices16[] =
9329 {{ 2.0f, 3.0f, 0.f}, {26214, 32768}},
9330 {{ 0.0f, 0.0f, 0.f}, {39321, 0}},
9332 {{ 3.0f, 3.0f, 0.f}, {0, 0}},
9333 {{ 3.0f, 0.0f, 0.f}, {0,
USHRT_MAX - 1}},
9336 const UINT exp_vertex_size16 =
sizeof(*exp_vertices16);
9338 const struct vertex_ptc vertices17[] =
9340 {{ 0.0f, 3.0f, 0.f}, {1.0f, 2.0f}},
9341 {{ 2.0f, 3.0f, 0.f}, {0.4f, 0.5f}},
9342 {{ 0.0f, 0.0f, 0.f}, {0.6f, -1.0f}},
9344 {{ 3.0f, 3.0f, 0.f}, {-0.4f, -0.5f}},
9345 {{ 3.0f, 0.0f, 0.f}, {-0.9f, 0.99998f}},
9346 {{ 1.0f, 0.0f, 0.f}, {
USHRT_MAX, 0.0f}},
9349 const UINT num_faces17 =
ARRAY_SIZE(vertices17) / VERTS_PER_FACE;
9350 const UINT vertex_size17 =
sizeof(*vertices17);
9351 const struct vertex_ptc_ushort4n exp_vertices17[] =
9354 {{ 2.0f, 3.0f, 0.f}, {26214, 32768, 0,
USHRT_MAX}},
9355 {{ 0.0f, 0.0f, 0.f}, {39321, 0, 0,
USHRT_MAX}},
9357 {{ 3.0f, 3.0f, 0.f}, {0, 0, 0,
USHRT_MAX}},
9361 const UINT exp_vertex_size17 =
sizeof(*exp_vertices17);
9365 const struct vertex_ptc vertices18[] =
9367 {{ 0.0f, 3.0f, 0.f}, { 1.0f, 1.0f}},
9368 {{ 2.0f, 3.0f, 0.f}, { 0.5f, 0.7f}},
9369 {{ 0.0f, 0.0f, 0.f}, {-0.2f, -0.3f}},
9371 {{ 3.0f, 3.0f, 0.f}, { 0.2f, 0.3f}},
9372 {{ 3.0f, 0.0f, 0.f}, { 1.0f, 1.0f}},
9373 {{ 1.0f, 0.0f, 0.f}, { 0.1f, 0.2f}},
9376 const UINT num_faces18 =
ARRAY_SIZE(vertices18) / VERTS_PER_FACE;
9377 const UINT vertex_size18 =
sizeof(*vertices18);
9378 const struct vertex_ptc_float16_2 exp_vertices18[] =
9380 {{ 0.0f, 3.0f, 0.f}, {0x3c00, 0x3c00}},
9381 {{ 2.0f, 3.0f, 0.f}, {0x3800, 0x399a}},
9382 {{ 0.0f, 0.0f, 0.f}, {0xb266, 0xb4cd}},
9384 {{ 3.0f, 3.0f, 0.f}, {0x3266, 0x34cd}},
9385 {{ 3.0f, 0.0f, 0.f}, {0x3c00, 0x3c00}},
9386 {{ 1.0f, 0.0f, 0.f}, {0x2e66, 0x3266}},
9388 const UINT exp_vertex_size18 =
sizeof(*exp_vertices18);
9391 const struct vertex_pntc vertices19[] =
9393 {{ 0.0f, 3.0f, 0.f},
up, { 1.0f, 1.0f}},
9394 {{ 2.0f, 3.0f, 0.f},
up, { 0.5f, 0.7f}},
9395 {{ 0.0f, 0.0f, 0.f},
up, {-0.2f, -0.3f}},
9397 {{ 3.0f, 3.0f, 0.f},
up, { 0.2f, 0.3f}},
9398 {{ 3.0f, 0.0f, 0.f},
up, { 1.0f, 1.0f}},
9399 {{ 1.0f, 0.0f, 0.f},
up, { 0.1f, 0.2f}},
9402 const UINT num_faces19 =
ARRAY_SIZE(vertices19) / VERTS_PER_FACE;
9403 const UINT vertex_size19 =
sizeof(*vertices19);
9404 const struct vertex_pntc exp_vertices19[] =
9406 {{ 0.0f, 3.0f, 0.f},
up, zero_vec2},
9407 {{ 2.0f, 3.0f, 0.f},
up, zero_vec2},
9408 {{ 0.0f, 0.0f, 0.f},
up, zero_vec2},
9410 {{ 3.0f, 3.0f, 0.f},
up, zero_vec2},
9411 {{ 3.0f, 0.0f, 0.f},
up, zero_vec2},
9412 {{ 1.0f, 0.0f, 0.f},
up, zero_vec2},
9414 const UINT exp_vertex_size19 =
sizeof(*exp_vertices19);
9417 const struct vertex_pntc vertices20[] =
9419 {{ 0.0f, 3.0f, 0.f},
up, { 1.0f, 1.0f}},
9420 {{ 2.0f, 3.0f, 0.f},
up, { 0.5f, 0.7f}},
9421 {{ 0.0f, 0.0f, 0.f},
up, {-0.2f, -0.3f}},
9423 {{ 3.0f, 3.0f, 0.f},
up, { 0.2f, 0.3f}},
9424 {{ 3.0f, 0.0f, 0.f},
up, { 1.0f, 1.0f}},
9425 {{ 1.0f, 0.0f, 0.f},
up, { 0.1f, 0.2f}},
9428 const UINT num_faces20 =
ARRAY_SIZE(vertices20) / VERTS_PER_FACE;
9429 const UINT vertex_size20 =
sizeof(*vertices20);
9430 const struct vertex_pntc exp_vertices20[] =
9432 {{ 0.0f, 3.0f, 0.f},
up, zero_vec2},
9433 {{ 2.0f, 3.0f, 0.f},
up, zero_vec2},
9434 {{ 0.0f, 0.0f, 0.f},
up, zero_vec2},
9436 {{ 3.0f, 3.0f, 0.f},
up, zero_vec2},
9437 {{ 3.0f, 0.0f, 0.f},
up, zero_vec2},
9438 {{ 1.0f, 0.0f, 0.f},
up, zero_vec2},
9440 const UINT exp_vertex_size20 =
sizeof(*exp_vertices20);
9442 const struct vertex_ptc_float1 vertices21[] =
9444 {{ 0.0f, 3.0f, 0.f}, 1.0f},
9445 {{ 2.0f, 3.0f, 0.f}, 0.5f},
9446 {{ 0.0f, 0.0f, 0.f}, -0.2f},
9448 {{ 3.0f, 3.0f, 0.f}, 0.2f},
9449 {{ 3.0f, 0.0f, 0.f}, 1.0f},
9450 {{ 1.0f, 0.0f, 0.f}, 0.1f},
9453 const UINT num_faces21 =
ARRAY_SIZE(vertices21) / VERTS_PER_FACE;
9454 const UINT vertex_size21 =
sizeof(*vertices21);
9455 const struct vertex_ptc exp_vertices21[] =
9457 {{ 0.0f, 3.0f, 0.f}, { 1.0f, 0.0f}},
9458 {{ 2.0f, 3.0f, 0.f}, { 0.5f, 0.0f}},
9459 {{ 0.0f, 0.0f, 0.f}, {-0.2f, 0.0f}},
9461 {{ 3.0f, 3.0f, 0.f}, { 0.2f, 0.0f}},
9462 {{ 3.0f, 0.0f, 0.f}, { 1.0f, 0.0f}},
9463 {{ 1.0f, 0.0f, 0.f}, { 0.1f, 0.0f}},
9465 const UINT exp_vertex_size21 =
sizeof(*exp_vertices21);
9467 const struct vertex_ptc_float1 vertices22[] =
9469 {{ 0.0f, 3.0f, 0.f}, 1.0f},
9470 {{ 2.0f, 3.0f, 0.f}, 0.5f},
9471 {{ 0.0f, 0.0f, 0.f}, -0.2f},
9473 {{ 3.0f, 3.0f, 0.f}, 0.2f},
9474 {{ 3.0f, 0.0f, 0.f}, 1.0f},
9475 {{ 1.0f, 0.0f, 0.f}, 0.1f},
9478 const UINT num_faces22 =
ARRAY_SIZE(vertices22) / VERTS_PER_FACE;
9479 const UINT vertex_size22 =
sizeof(*vertices22);
9480 const struct vertex_ptc_float3 exp_vertices22[] =
9482 {{ 0.0f, 3.0f, 0.f}, { 1.0f, 0.0f, 0.0f}},
9483 {{ 2.0f, 3.0f, 0.f}, { 0.5f, 0.0f, 0.0f}},
9484 {{ 0.0f, 0.0f, 0.f}, {-0.2f, 0.0f, 0.0f}},
9486 {{ 3.0f, 3.0f, 0.f}, { 0.2f, 0.0f, 0.0f}},
9487 {{ 3.0f, 0.0f, 0.f}, { 1.0f, 0.0f, 0.0f}},
9488 {{ 1.0f, 0.0f, 0.f}, { 0.1f, 0.0f, 0.0f}},
9490 const UINT exp_vertex_size22 =
sizeof(*exp_vertices22);
9492 const struct vertex_ptc_float1 vertices23[] =
9494 {{ 0.0f, 3.0f, 0.f}, 1.0f},
9495 {{ 2.0f, 3.0f, 0.f}, 0.5f},
9496 {{ 0.0f, 0.0f, 0.f}, -0.2f},
9498 {{ 3.0f, 3.0f, 0.f}, 0.2f},
9499 {{ 3.0f, 0.0f, 0.f}, 1.0f},
9500 {{ 1.0f, 0.0f, 0.f}, 0.1f},
9503 const UINT num_faces23 =
ARRAY_SIZE(vertices23) / VERTS_PER_FACE;
9504 const UINT vertex_size23 =
sizeof(*vertices23);
9505 const struct vertex_ptc_float4 exp_vertices23[] =
9507 {{ 0.0f, 3.0f, 0.f}, { 1.0f, 0.0f, 0.0f, 1.0f}},
9508 {{ 2.0f, 3.0f, 0.f}, { 0.5f, 0.0f, 0.0f, 1.0f}},
9509 {{ 0.0f, 0.0f, 0.f}, {-0.2f, 0.0f, 0.0f, 1.0f}},
9511 {{ 3.0f, 3.0f, 0.f}, { 0.2f, 0.0f, 0.0f, 1.0f}},
9512 {{ 3.0f, 0.0f, 0.f}, { 1.0f, 0.0f, 0.0f, 1.0f}},
9513 {{ 1.0f, 0.0f, 0.f}, { 0.1f, 0.0f, 0.0f, 1.0f}},
9515 const UINT exp_vertex_size23 =
sizeof(*exp_vertices23);
9517 const struct vertex_ptc_float1 vertices24[] =
9519 {{ 0.0f, 3.0f, 0.f}, 1.0f},
9520 {{ 2.0f, 3.0f, 0.f}, 0.5f},
9521 {{ 0.0f, 0.0f, 0.f}, -0.2f},
9523 {{ 3.0f, 3.0f, 0.f}, 0.2f},
9524 {{ 3.0f, 0.0f, 0.f}, 1.0f},
9525 {{ 1.0f, 0.0f, 0.f}, 0.11f},
9528 const UINT num_faces24 =
ARRAY_SIZE(vertices24) / VERTS_PER_FACE;
9529 const UINT vertex_size24 =
sizeof(*vertices24);
9530 const struct vertex_ptc_d3dcolor exp_vertices24[] =
9532 {{ 0.0f, 3.0f, 0.f}, {0, 0, 255, 255}},
9533 {{ 2.0f, 3.0f, 0.f}, {0, 0, 128, 255}},
9534 {{ 0.0f, 0.0f, 0.f}, {0, 0, 0, 255}},
9536 {{ 3.0f, 3.0f, 0.f}, {0, 0, 51, 255}},
9537 {{ 3.0f, 0.0f, 0.f}, {0, 0, 255, 255}},
9538 {{ 1.0f, 0.0f, 0.f}, {0, 0, 28, 255}},
9540 const UINT exp_vertex_size24 =
sizeof(*exp_vertices24);
9542 const struct vertex_ptc_float1 vertices25[] =
9544 {{ 0.0f, 3.0f, 0.f}, 0.0f},
9545 {{ 2.0f, 3.0f, 0.f}, 1.4f},
9546 {{ 0.0f, 0.0f, 0.f}, 1.5f},
9548 {{ 3.0f, 3.0f, 0.f}, 255.0f},
9549 {{ 3.0f, 0.0f, 0.f}, 256.0f},
9550 {{ 1.0f, 0.0f, 0.f}, -1.0f},
9553 const UINT num_faces25 =
ARRAY_SIZE(vertices25) / VERTS_PER_FACE;
9554 const UINT vertex_size25 =
sizeof(*vertices25);
9555 const struct vertex_ptc_ubyte4 exp_vertices25[] =
9557 {{ 0.0f, 3.0f, 0.f}, {0, 0, 0, 1}},
9558 {{ 2.0f, 3.0f, 0.f}, {1, 0, 0, 1}},
9559 {{ 0.0f, 0.0f, 0.f}, {2, 0, 0, 1}},
9561 {{ 3.0f, 3.0f, 0.f}, {255, 0, 0, 1}},
9562 {{ 3.0f, 0.0f, 0.f}, {0, 0, 0, 1}},
9563 {{ 1.0f, 0.0f, 0.f}, {0, 0, 0, 1}},
9565 const UINT exp_vertex_size25 =
sizeof(*exp_vertices25);
9567 const struct vertex_ptc_float4 vertices26[] =
9569 {{ 0.0f, 3.0f, 0.f}, {0.0f, 1.0f, 0.4f, 0.5f}},
9570 {{ 2.0f, 3.0f, 0.f}, {-0.4f, -0.5f, -1.0f, -2.0f}},
9571 {{ 0.0f, 0.0f, 0.f}, {254.0f, 255.0f, 256.0f, 257.0f}},
9573 {{ 3.0f, 3.0f, 0.f}, {0.1f, 0.2f, 0.3f, 0.4f}},
9574 {{ 3.0f, 0.0f, 0.f}, {0.5f, 0.6f, 0.7f, 0.8f}},
9575 {{ 1.0f, 0.0f, 0.f}, {0.9f, 0.99f, 0.995f, 0.999f}},
9578 const UINT num_faces26 =
ARRAY_SIZE(vertices26) / VERTS_PER_FACE;
9579 const UINT vertex_size26 =
sizeof(*vertices26);
9580 const struct vertex_ptc_d3dcolor exp_vertices26[] =
9582 {{ 0.0f, 3.0f, 0.f}, {102, 255, 0, 128}},
9583 {{ 2.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
9584 {{ 0.0f, 0.0f, 0.f}, {255, 255, 255, 255}},
9586 {{ 3.0f, 3.0f, 0.f}, {77, 51, 26, 102}},
9587 {{ 3.0f, 0.0f, 0.f}, {179, 153, 128, 204}},
9588 {{ 1.0f, 0.0f, 0.f}, {254, 252, 230, 255}},
9590 const UINT exp_vertex_size26 =
sizeof(*exp_vertices26);
9592 const struct vertex_ptc_d3dcolor vertices27[] =
9594 {{ 0.0f, 3.0f, 0.f}, {102, 255, 0, 128}},
9595 {{ 2.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
9596 {{ 0.0f, 0.0f, 0.f}, {255, 255, 255, 255}},
9598 {{ 3.0f, 3.0f, 0.f}, {77, 51, 26, 102}},
9599 {{ 3.0f, 0.0f, 0.f}, {179, 153, 128, 204}},
9600 {{ 1.0f, 0.0f, 0.f}, {254, 252, 230, 255}},
9603 const UINT num_faces27 =
ARRAY_SIZE(vertices27) / VERTS_PER_FACE;
9604 const UINT vertex_size27 =
sizeof(*vertices27);
9605 const struct vertex_ptc_float4 exp_vertices27[] =
9607 {{ 0.0f, 3.0f, 0.f}, {0.0f, 1.0f, 0.4f, 0.501961f}},
9608 {{ 2.0f, 3.0f, 0.f}, {0.0f, 0.0f, 0.0f, 0.0f}},
9609 {{ 0.0f, 0.0f, 0.f}, {1.0f, 1.0f, 1.0f, 1.0f}},
9611 {{ 3.0f, 3.0f, 0.f}, {0.101961f, 0.2f, 0.301961f, 0.4f}},
9612 {{ 3.0f, 0.0f, 0.f}, {0.501961f, 0.6f, 0.701961f, 0.8f}},
9613 {{ 1.0f, 0.0f, 0.f}, {0.901961f, 0.988235f, 0.996078f, 1.0f}},
9615 const UINT exp_vertex_size27 =
sizeof(*exp_vertices27);
9617 const struct vertex_ptc_ubyte4 vertices28[] =
9619 {{ 0.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
9620 {{ 2.0f, 3.0f, 0.f}, {1, 1, 1, 1}},
9621 {{ 0.0f, 0.0f, 0.f}, {1, 0, 1, 0}},
9623 {{ 3.0f, 3.0f, 0.f}, {0, 1, 0, 1}},
9624 {{ 3.0f, 0.0f, 0.f}, {10, 20, 30, 40}},
9625 {{ 1.0f, 0.0f, 0.f}, {50, 60, 127, 255}},
9628 const UINT num_faces28 =
ARRAY_SIZE(vertices28) / VERTS_PER_FACE;
9629 const UINT vertex_size28 =
sizeof(*vertices28);
9630 const struct vertex_ptc_float4 exp_vertices28[] =
9632 {{ 0.0f, 3.0f, 0.f}, {0.0f, 0.0f, 0.0f, 0.0f}},
9633 {{ 2.0f, 3.0f, 0.f}, {1.0f, 1.0f, 1.0f, 1.0f}},
9634 {{ 0.0f, 0.0f, 0.f}, {1.0f, 0.0f, 1.0f, 0.0f}},
9636 {{ 3.0f, 3.0f, 0.f}, {0.0f, 1.0f, 0.0f, 1.0f}},
9637 {{ 3.0f, 0.0f, 0.f}, {10.0f, 20.0f, 30.0f, 40.0f}},
9638 {{ 1.0f, 0.0f, 0.f}, {50.0f, 60.0f, 127.0f, 255.0f}},
9640 const UINT exp_vertex_size28 =
sizeof(*exp_vertices28);
9642 const struct vertex_ptc_short2 vertices29[] =
9644 {{ 0.0f, 3.0f, 0.f}, {0, 0}},
9645 {{ 2.0f, 3.0f, 0.f}, {0, 1}},
9646 {{ 0.0f, 0.0f, 0.f}, {1, 0}},
9648 {{ 3.0f, 3.0f, 0.f}, {1, 1}},
9650 {{ 1.0f, 0.0f, 0.f}, {-42, 42}},
9653 const UINT num_faces29 =
ARRAY_SIZE(vertices29) / VERTS_PER_FACE;
9654 const UINT vertex_size29 =
sizeof(*vertices29);
9655 const struct vertex_ptc_float4 exp_vertices29[] =
9657 {{ 0.0f, 3.0f, 0.f}, {0.0f, 0.0f, 0.0f, 1.0f}},
9658 {{ 2.0f, 3.0f, 0.f}, {0.0f, 1.0f, 0.0f, 1.0f }},
9659 {{ 0.0f, 0.0f, 0.f}, {1.0f, 0.0f, 0.0f, 1.0f}},
9661 {{ 3.0f, 3.0f, 0.f}, {1.0f, 1.0f, 0.0f, 1.0f}},
9663 {{ 1.0f, 0.0f, 0.f}, {-42.0f, 42.0f, 0.0f, 1.0f}},
9665 const UINT exp_vertex_size29 =
sizeof(*exp_vertices29);
9667 const struct vertex_ptc_short4 vertices30[] =
9669 {{ 0.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
9670 {{ 2.0f, 3.0f, 0.f}, {0, 1, 0, 1}},
9671 {{ 0.0f, 0.0f, 0.f}, {1, 0, 1, 0}},
9673 {{ 3.0f, 3.0f, 0.f}, {1, 1, 1, 1}},
9678 const UINT num_faces30 =
ARRAY_SIZE(vertices30) / VERTS_PER_FACE;
9679 const UINT vertex_size30 =
sizeof(*vertices30);
9680 const struct vertex_ptc_float4 exp_vertices30[] =
9682 {{ 0.0f, 3.0f, 0.f}, {0.0f, 0.0f, 0.0f, 0.0f}},
9683 {{ 2.0f, 3.0f, 0.f}, {0.0f, 1.0f, 0.0f, 1.0f }},
9684 {{ 0.0f, 0.0f, 0.f}, {1.0f, 0.0f, 1.0f, 0.0f}},
9686 {{ 3.0f, 3.0f, 0.f}, {1.0f, 1.0f, 1.0f, 1.0f}},
9690 const UINT exp_vertex_size30 =
sizeof(*exp_vertices30);
9692 const struct vertex_ptc_ubyte4n vertices31[] =
9694 {{ 0.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
9695 {{ 2.0f, 3.0f, 0.f}, {1, 1, 1, 1}},
9696 {{ 0.0f, 0.0f, 0.f}, {1, 0, 1, 0}},
9698 {{ 3.0f, 3.0f, 0.f}, {0, 1, 0, 1}},
9699 {{ 3.0f, 0.0f, 0.f}, {10, 20, 30, 40}},
9700 {{ 1.0f, 0.0f, 0.f}, {50, 60, 70,
UCHAR_MAX}},
9703 const UINT num_faces31 =
ARRAY_SIZE(vertices31) / VERTS_PER_FACE;
9704 const UINT vertex_size31 =
sizeof(*vertices31);
9705 const struct vertex_ptc_float4 exp_vertices31[] =
9707 {{ 0.0f, 3.0f, 0.f}, {0.0f, 0.0f, 0.0f, 0.0f}},
9715 const UINT exp_vertex_size31 =
sizeof(*exp_vertices31);
9717 const struct vertex_ptc_short2 vertices32[] =
9719 {{ 0.0f, 3.0f, 0.f}, {0, 0}},
9720 {{ 2.0f, 3.0f, 0.f}, {0, 1}},
9721 {{ 0.0f, 0.0f, 0.f}, {1, 0}},
9723 {{ 3.0f, 3.0f, 0.f}, {1, 1}},
9725 {{ 1.0f, 0.0f, 0.f}, {-42, 42}},
9728 const UINT num_faces32 =
ARRAY_SIZE(vertices32) / VERTS_PER_FACE;
9729 const UINT vertex_size32 =
sizeof(*vertices32);
9730 const struct vertex_ptc_float4 exp_vertices32[] =
9732 {{ 0.0f, 3.0f, 0.f}, {0.0f, 0.0f, 0.0f, 1.0f}},
9733 {{ 2.0f, 3.0f, 0.f}, {0.0f, 1.0f/
SHRT_MAX, 0.0f, 1.0f}},
9734 {{ 0.0f, 0.0f, 0.f}, {1.0f/
SHRT_MAX, 0.0f, 0.0f, 1.0f}},
9737 {{ 3.0f, 0.0f, 0.f}, {-1.0f, 1.0f, 0.0f, 1.0f}},
9740 const UINT exp_vertex_size32 =
sizeof(*exp_vertices32);
9742 const struct vertex_ptc_short4 vertices33[] =
9744 {{ 0.0f, 3.0f, 0.f}, {0, 0, 0, 0}},
9745 {{ 2.0f, 3.0f, 0.f}, {0, 1, 0, 1}},
9746 {{ 0.0f, 0.0f, 0.f}, {1, 0, 1, 0}},
9748 {{ 3.0f, 3.0f, 0.f}, {1, 1, 1, 1}},
9750 {{ 1.0f, 0.0f, 0.f}, {-42, 42, 1, 1}},
9753 const UINT num_faces33 =
ARRAY_SIZE(vertices33) / VERTS_PER_FACE;
9754 const UINT vertex_size33 =
sizeof(*vertices33);
9755 const struct vertex_ptc_float4 exp_vertices33[] =
9757 {{ 0.0f, 3.0f, 0.f}, {0.0f, 0.0f, 0.0f, 0.0f}},
9762 {{ 3.0f, 0.0f, 0.f}, {-1.0f, 1.0f, -1.0f, 1.0f}},
9765 const UINT exp_vertex_size33 =
sizeof(*exp_vertices33);
9767 const struct vertex_ptc_float16_2 vertices34[] =
9769 {{ 0.0f, 3.0f, 0.f}, {0x3c00, 0x3c00}},
9770 {{ 2.0f, 3.0f, 0.f}, {0x3800, 0x399a}},
9771 {{ 0.0f, 0.0f, 0.f}, {0xb266, 0xb4cd}},
9773 {{ 3.0f, 3.0f, 0.f}, {0x3266, 0x34cd}},
9774 {{ 3.0f, 0.0f, 0.f}, {0x3c00, 0x3c00}},
9775 {{ 1.0f, 0.0f, 0.f}, {0x2e66, 0x3266}},
9778 const UINT num_faces34 =
ARRAY_SIZE(vertices34) / VERTS_PER_FACE;
9779 const UINT vertex_size34 =
sizeof(*vertices34);
9780 const struct vertex_ptc_float4 exp_vertices34[] =
9782 {{ 0.0f, 3.0f, 0.f}, {1.0f, 1.0f, 0.0f, 1.0f}},
9783 {{ 2.0f, 3.0f, 0.f}, {0.5f, 0.700195f, 0.0f, 1.0f}},
9784 {{ 0.0f, 0.0f, 0.f}, {-0.199951f, -0.300049f, 0.0f, 1.0f}},
9786 {{ 3.0f, 3.0f, 0.f}, {0.199951f, 0.300049f, 0.0f, 1.0f}},
9787 {{ 3.0f, 0.0f, 0.f}, {1.0f, 1.0f, 0.0f, 1.0f}},
9788 {{ 1.0f, 0.0f, 0.f}, {0.099976f, 0.199951f, 0.0f, 1.0f}},
9790 const UINT exp_vertex_size34 =
sizeof(*exp_vertices34);
9792 const struct vertex_ptc_float16_4 vertices35[] =
9794 {{ 0.0f, 3.0f, 0.f}, {0x0000, 0x0000, 0x0000, 0x0000}},
9795 {{ 2.0f, 3.0f, 0.f}, {0x3c00, 0x3c00, 0x3c00, 0x3c00}},
9796 {{ 0.0f, 0.0f, 0.f}, {0x3c00, 0x0000, 0x3c00, 0x0000}},
9798 {{ 3.0f, 3.0f, 0.f}, {0x0000, 0x3c00, 0x0000, 0x3c00}},
9799 {{ 3.0f, 0.0f, 0.f}, {0x3800, 0x399a, 0xb266, 0xb4cd}},
9800 {{ 1.0f, 0.0f, 0.f}, {0x2e66, 0x3266, 0x2e66, 0x3266}},
9803 const UINT num_faces35 =
ARRAY_SIZE(vertices35) / VERTS_PER_FACE;
9804 const UINT vertex_size35 =
sizeof(*vertices35);
9805 const struct vertex_ptc_float4 exp_vertices35[] =
9807 {{ 0.0f, 3.0f, 0.f}, {0.0f, 0.0f, 0.0f, 0.0f}},
9808 {{ 2.0f, 3.0f, 0.f}, {1.0f, 1.0f, 1.0f, 1.0f}},
9809 {{ 0.0f, 0.0f, 0.f}, {1.0f, 0.0f, 1.0f, 0.0f}},
9811 {{ 3.0f, 3.0f, 0.f}, {0.0f, 1.0f, 0.0f, 1.0f}},
9812 {{ 3.0f, 0.0f, 0.f}, {0.5f, 0.700195f, -0.199951f, -0.300049f}},
9813 {{ 1.0f, 0.0f, 0.f}, {0.099976f, 0.199951f, 0.099976f, 0.199951f}},
9815 const UINT exp_vertex_size35 =
sizeof(*exp_vertices35);
9817 const struct vertex_pn vertices36[] =
9819 {{ 0.0f, 3.0f, 0.f},
up},
9820 {{ 2.0f, 3.0f, 0.f},
up},
9821 {{ 0.0f, 0.0f, 0.f},
up},
9824 const UINT num_faces36 =
ARRAY_SIZE(vertices36) / VERTS_PER_FACE;
9825 const UINT vertex_size36 =
sizeof(*vertices36);
9829 ID3DXMesh *mesh_clone =
NULL;
9832 const BYTE *vertices;
9835 const UINT num_vertices;
9836 const UINT num_faces;
9837 const UINT vertex_size;
9838 const DWORD create_options;
9839 const DWORD clone_options;
9842 const BYTE *exp_vertices;
9843 const UINT exp_vertex_size;
9886 (
BYTE*)exp_vertices2,
9900 (
BYTE*)exp_vertices3,
9913 declaration_ptc_float16_2,
9914 (
BYTE*)exp_vertices4,
9927 declaration_ptc_float16_4,
9928 (
BYTE*)exp_vertices5,
9941 declaration_ptc_float1,
9942 (
BYTE*)exp_vertices6,
9955 declaration_ptc_float3,
9956 (
BYTE*)exp_vertices7,
9969 declaration_ptc_float4,
9970 (
BYTE*)exp_vertices8,
9983 declaration_ptc_d3dcolor,
9984 (
BYTE*)exp_vertices9,
9997 declaration_ptc_ubyte4,
9998 (
BYTE*)exp_vertices10,
10011 declaration_ptc_short2,
10012 (
BYTE*)exp_vertices11,
10025 declaration_ptc_short4,
10026 (
BYTE*)exp_vertices12,
10039 declaration_ptc_ubyte4n,
10040 (
BYTE*)exp_vertices13,
10053 declaration_ptc_short2n,
10054 (
BYTE*)exp_vertices14,
10067 declaration_ptc_short4n,
10068 (
BYTE*)exp_vertices15,
10081 declaration_ptc_ushort2n,
10082 (
BYTE*)exp_vertices16,
10095 declaration_ptc_ushort4n,
10096 (
BYTE*)exp_vertices17,
10109 declaration_ptc_float16_2_partialu,
10110 (
BYTE*)exp_vertices18,
10124 (
BYTE*)exp_vertices19,
10138 (
BYTE*)exp_vertices20,
10150 declaration_ptc_float1,
10152 (
BYTE*)exp_vertices21,
10164 declaration_ptc_float1,
10165 declaration_ptc_float3,
10166 (
BYTE*)exp_vertices22,
10178 declaration_ptc_float1,
10179 declaration_ptc_float4,
10180 (
BYTE*)exp_vertices23,
10192 declaration_ptc_float1,
10193 declaration_ptc_d3dcolor,
10194 (
BYTE*)exp_vertices24,
10206 declaration_ptc_float1,
10207 declaration_ptc_ubyte4,
10208 (
BYTE*)exp_vertices25,
10220 declaration_ptc_float4,
10221 declaration_ptc_d3dcolor,
10222 (
BYTE*)exp_vertices26,
10234 declaration_ptc_d3dcolor,
10235 declaration_ptc_float4,
10236 (
BYTE*)exp_vertices27,
10248 declaration_ptc_ubyte4,
10249 declaration_ptc_float4,
10250 (
BYTE*)exp_vertices28,
10262 declaration_ptc_short2,
10263 declaration_ptc_float4,
10264 (
BYTE*)exp_vertices29,
10276 declaration_ptc_short4,
10277 declaration_ptc_float4,
10278 (
BYTE*)exp_vertices30,
10290 declaration_ptc_ubyte4n,
10291 declaration_ptc_float4,
10292 (
BYTE*)exp_vertices31,
10304 declaration_ptc_short2n,
10305 declaration_ptc_float4,
10306 (
BYTE*)exp_vertices32,
10318 declaration_ptc_short4n,
10319 declaration_ptc_float4,
10320 (
BYTE*)exp_vertices33,
10332 declaration_ptc_float16_2,
10333 declaration_ptc_float4,
10334 (
BYTE*)exp_vertices34,
10346 declaration_ptc_float16_4,
10347 declaration_ptc_float4,
10348 (
BYTE*)exp_vertices35,
10370 skip(
"Couldn't create test context\n");
10378 UINT exp_new_decl_length, new_decl_length;
10379 UINT exp_new_decl_size, new_decl_size;
10382 tc[
i].create_options,
10386 tc[
i].indices,
tc[
i].attributes);
10389 skip(
"Couldn't initialize test mesh %d. Got %lx expected D3D_OK\n",
i,
hr);
10393 hr =
mesh->lpVtbl->CloneMesh(
mesh,
tc[
i].clone_options,
tc[
i].new_declaration,
10395 ok(
hr ==
D3D_OK,
"Test %u, got unexpected hr %#lx.\n",
i,
hr);
10397 hr = mesh_clone->lpVtbl->GetDeclaration(mesh_clone, new_declaration);
10398 ok(
hr ==
D3D_OK,
"Test %u, got unexpected hr %#lx.\n",
i,
hr);
10400 for (
j = 0;
tc[
i].new_declaration[
j].Stream != 0xFF;
j++)
10402 ok(
memcmp(&
tc[
i].new_declaration[
j], &new_declaration[
j],
sizeof(*new_declaration)) == 0,
10403 "Test case %d failed. Declaration element %d did not match.\n",
i,
j);
10409 ok(new_decl_length == exp_new_decl_length,
10410 "Test case %d failed. Got new declaration length %d, expected %d\n",
10411 i, new_decl_length, exp_new_decl_length);
10416 ok(new_decl_size == exp_new_decl_size,
10417 "Test case %d failed. Got new declaration size %d, expected %d\n",
10418 i, new_decl_size, exp_new_decl_size);
10421 hr = mesh_clone->lpVtbl->LockVertexBuffer(mesh_clone, 0, (
void**)&vertices);
10424 skip(
"Couldn't lock cloned vertex buffer.\n");
10427 for (
j = 0;
j <
tc[
i].num_vertices;
j++)
10432 hr = mesh_clone->lpVtbl->UnlockVertexBuffer(mesh_clone);
10435 skip(
"Couldn't unlock vertex buffer.\n");
10441 mesh_clone->lpVtbl->Release(mesh_clone);
10450 tc[2].create_options,
10454 tc[2].indices,
tc[2].attributes);
10457 skip(
"Couldn't initialize test mesh for D3DXMESH_VB_SHARE case."
10458 " Got %lx expected D3D_OK\n",
hr);
10466 " declaration. Got %lx, expected D3DERR_INVALIDCALL\n",
10473 if (vertices)
mesh->lpVtbl->UnlockVertexBuffer(
mesh);
10475 if (mesh_clone) mesh_clone->lpVtbl->Release(mesh_clone);
10490 const unsigned int VERTS_PER_FACE = 3;
10500 { 0.0f, 3.0f, 0.f},
10501 { 2.0f, 3.0f, 0.f},
10502 { 0.0f, 0.0f, 0.f},
10504 const DWORD indices0[] = {0, 1, 2};
10505 const unsigned int num_vertices0 =
ARRAY_SIZE(vertices0);
10506 const unsigned int num_faces0 =
ARRAY_SIZE(indices0) / VERTS_PER_FACE;
10507 const DWORD adjacency0[] = {-1, -1, -1};
10518 { 0.0f, 3.0f, 0.f},
10519 { 2.0f, 3.0f, 0.f},
10520 { 0.0f, 0.0f, 0.f},
10522 { 4.0f, 3.0f, 0.f},
10523 { 4.0f, 0.0f, 0.f},
10525 const DWORD indices1[] = {0, 1, 2, 1, 3, 4};
10526 const unsigned int num_vertices1 =
ARRAY_SIZE(vertices1);
10527 const unsigned int num_faces1 =
ARRAY_SIZE(indices1) / VERTS_PER_FACE;
10528 const DWORD adjacency1[] = {-1, -1, -1, -1, -1, -1};
10538 const UINT num_vertices;
10539 const UINT num_faces;
10540 const DWORD *adjacency;
10566 skip(
"Couldn't create test context\n");
10579 skip(
"Couldn't initialize test mesh %d. Got %lx expected D3D_OK\n",
i,
hr);
10584 todo_wine ok(
hr ==
tc[
i].exp_hr,
"Test %u, got unexpected hr %#lx, expected %#lx.\n",
i,
hr,
tc[
i].exp_hr);
10588 if (errors_and_warnings)
10591 errors_and_warnings =
NULL;
10606 DWORD smallest_face_remap;
10614 const DWORD indices0[] = {0, 1, 2};
10615 const UINT num_faces0 = 1;
10616 const UINT num_vertices0 = 3;
10617 const DWORD exp_face_remap0[] = {0};
10625 const DWORD indices1[] = {0, 1, 2, 3, 4, 5};
10626 const UINT num_faces1 = 2;
10627 const UINT num_vertices1 = 6;
10628 const DWORD exp_face_remap1[] = {1, 0};
10636 const DWORD indices2[] = {0, 1, 2, 1, 3, 2};
10637 const UINT num_faces2 = 2;
10638 const UINT num_vertices2 = 4;
10639 const DWORD exp_face_remap2[] = {1, 0};
10650 const DWORD indices3[] = {0, 1, 2, 1, 3, 2, 2, 3, 4, 3, 4, 5};
10651 const UINT num_faces3 = 4;
10652 const UINT num_vertices3 = 6;
10653 const DWORD exp_face_remap3[] = {3, 2, 1, 0};
10664 const WORD indices4[] = {0, 1, 2, 1, 3, 2, 2, 3, 4, 3, 4, 5};
10665 const UINT num_faces4 = 4;
10666 const UINT num_vertices4 = 6;
10667 const DWORD exp_face_remap4[] = {3, 2, 1, 0};
10672 const UINT num_faces;
10673 const UINT num_vertices;
10674 const BOOL indices_are_32bit;
10675 const DWORD *exp_face_remap;
10721 face_remap =
calloc(
tc[
i].num_faces,
sizeof(*face_remap));
10724 tc[
i].num_vertices,
tc[
i].indices_are_32bit,
10726 ok(
hr ==
D3D_OK,
"Test %u, got unexpected hr %#lx.\n",
i,
hr);
10729 for (
j = 0;
j <
tc[
i].num_faces;
j++)
10731 ok(
tc[
i].exp_face_remap[
j] == face_remap[
j],
10732 "Test case %d: Got face %ld at %ld, expected %ld\n",
i,
10733 face_remap[
j],
j,
tc[
i].exp_face_remap[
j]);
10741 tc[0].num_vertices,
tc[0].indices_are_32bit,
10748 &smallest_face_remap);
10754 static const WORD indices_16bit[] = {0, 1, 2};
10756 DWORD vertex_remap[3];
10762 for (
i = 0;
i < 3; ++
i)
10763 ok(vertex_remap[
i] ==
i,
"Unexpected vertex remap %u -> %lu.\n",
i, vertex_remap[
i]);
10767 for (
i = 0;
i < 3; ++
i)
10768 ok(vertex_remap[
i] ==
i,
"Unexpected vertex remap %u -> %lu.\n",
i, vertex_remap[
i]);
10787 size_t normal_size;
10788 DWORD i, num_vertices, vertex_stride;
10805 if (!normal_declaration)
10818 trace(
"Cannot clear normals\n");
10822 num_vertices =
mesh->lpVtbl->GetNumVertices(
mesh);
10823 vertex_stride =
mesh->lpVtbl->GetNumBytesPerVertex(
mesh);
10825 if (
FAILED(
hr =
mesh->lpVtbl->LockVertexBuffer(
mesh, 0, (
void **)&vertices)))
10828 vertices += normal_declaration->
Offset;
10830 for (
i = 0;
i < num_vertices;
i++, vertices += vertex_stride)
10833 return mesh->lpVtbl->UnlockVertexBuffer(
mesh);
10837 ID3DXMesh *
mesh,
const D3DXVECTOR3 *normals,
unsigned int num_normals)
10841 DWORD num_vertices, vertex_stride;
10860 if (!normal_declaration)
10872 num_vertices =
mesh->lpVtbl->GetNumVertices(
mesh);
10873 vertex_stride =
mesh->lpVtbl->GetNumBytesPerVertex(
mesh);
10875 ok_(__FILE__,
line)(num_vertices == num_normals,
"%s: Expected %u vertices, got %lu\n",
test_name,
10876 num_normals, num_vertices);
10878 if (
FAILED(
mesh->lpVtbl->LockVertexBuffer(
mesh, 0, (
void **)&vertices)))
10884 vertices += normal_declaration->
Offset;
10886 for (
i = 0;
i <
min(num_vertices, num_normals);
i++, vertices += vertex_stride)
10892 "%s: normal %2u, expected (%f, %f, %f), got (%f, %f, %f)\n",
10900 "%s: normal %2u, expected (%f, %f, %f, %f), got (%f, %f, %f, %f)\n",
10902 n->x,
n->y,
n->z,
n->w);
10906 mesh->lpVtbl->UnlockVertexBuffer(
mesh);
10918 adjacency, -1.01f, -0.01f, -1.01f,
NULL,
NULL);
10925 ID3DXMesh *
mesh, *cloned_mesh;
10931 static const struct compute_normals_func
10936 compute_normals_funcs[] =
10944 {-1.0f, 0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f},
10945 { 0.0f, 1.0f, 0.0f}, { 0.0f, 1.0f, 0.0f}, { 0.0f, 1.0f, 0.0f}, { 0.0f, 1.0f, 0.0f},
10946 { 1.0f, 0.0f, 0.0f}, { 1.0f, 0.0f, 0.0f}, { 1.0f, 0.0f, 0.0f}, { 1.0f, 0.0f, 0.0f},
10947 { 0.0f,-1.0f, 0.0f}, { 0.0f,-1.0f, 0.0f}, { 0.0f,-1.0f, 0.0f}, { 0.0f,-1.0f, 0.0f},
10948 { 0.0f, 0.0f, 1.0f}, { 0.0f, 0.0f, 1.0f}, { 0.0f, 0.0f, 1.0f}, { 0.0f, 0.0f, 1.0f},
10949 { 0.0f, 0.0f,-1.0f}, { 0.0f, 0.0f,-1.0f}, { 0.0f, 0.0f,-1.0f}, { 0.0f, 0.0f,-1.0f}
10951 const float box_normal_component = 1.0f /
sqrtf(3.0f);
10954 {-box_normal_component, -box_normal_component, -box_normal_component},
10955 {-box_normal_component, -box_normal_component, box_normal_component},
10956 {-box_normal_component, box_normal_component, box_normal_component},
10957 {-box_normal_component, box_normal_component, -box_normal_component},
10958 {-box_normal_component, box_normal_component, -box_normal_component},
10959 {-box_normal_component, box_normal_component, box_normal_component},
10960 { box_normal_component, box_normal_component, box_normal_component},
10961 { box_normal_component, box_normal_component, -box_normal_component},
10962 { box_normal_component, box_normal_component, -box_normal_component},
10963 { box_normal_component, box_normal_component, box_normal_component},
10964 { box_normal_component, -box_normal_component, box_normal_component},
10965 { box_normal_component, -box_normal_component, -box_normal_component},
10966 {-box_normal_component, -box_normal_component, box_normal_component},
10967 {-box_normal_component, -box_normal_component, -box_normal_component},
10968 { box_normal_component, -box_normal_component, -box_normal_component},
10969 { box_normal_component, -box_normal_component, box_normal_component},
10970 {-box_normal_component, -box_normal_component, box_normal_component},
10971 { box_normal_component, -box_normal_component, box_normal_component},
10972 { box_normal_component, box_normal_component, box_normal_component},
10973 {-box_normal_component, box_normal_component, box_normal_component},
10974 {-box_normal_component, -box_normal_component, -box_normal_component},
10975 {-box_normal_component, box_normal_component, -box_normal_component},
10976 { box_normal_component, box_normal_component, -box_normal_component},
10977 { box_normal_component, -box_normal_component, -box_normal_component}
10979 static const D3DXVECTOR3 box_normals_adjacency_area[24] =
10981 {-0.666667f, -0.333333f, -0.666667f}, {-0.333333f, -0.666667f, 0.666667f},
10982 {-0.816496f, 0.408248f, 0.408248f}, {-0.408248f, 0.816496f, -0.408248f},
10983 {-0.408248f, 0.816496f, -0.408248f}, {-0.816496f, 0.408248f, 0.408248f},
10984 { 0.333333f, 0.666667f, 0.666667f}, { 0.666667f, 0.333333f, -0.666667f},
10985 { 0.666667f, 0.333333f, -0.666667f}, { 0.333333f, 0.666667f, 0.666667f},
10986 { 0.816496f, -0.408248f, 0.408248f}, { 0.408248f, -0.816496f, -0.408248f},
10987 {-0.333333f, -0.666667f, 0.666667f}, {-0.666667f, -0.333333f, -0.666667f},
10988 { 0.408248f, -0.816496f, -0.408248f}, { 0.816496f, -0.408248f, 0.408248f},
10989 {-0.333333f, -0.666667f, 0.666667f}, { 0.816497f, -0.408248f, 0.408248f},
10990 { 0.333333f, 0.666667f, 0.666667f}, {-0.816497f, 0.408248f, 0.408248f},
10991 {-0.666667f, -0.333333f, -0.666667f}, {-0.408248f, 0.816497f, -0.408248f},
10992 { 0.666667f, 0.333333f, -0.666667f}, { 0.408248f, -0.816496f, -0.408248f}
10994 static const D3DXVECTOR3 box_normals_position1f[24] = {{0}};
10995 static const D3DXVECTOR3 box_normals_position2f[24] =
10997 {0.0f, 0.0f, -1.0f}, {0.0f, 0.0f, 1.0f}, {0.0f, 0.0f, 1.0f},
10998 {0.0f, 0.0f, -1.0f}, {0.0f, 0.0f, -1.0f}, {0.0f, 0.0f, 1.0f},
10999 {0.0f, 0.0f, 1.0f}, {0.0f, 0.0f, -1.0f}, {0.0f, 0.0f, -1.0f},
11000 {0.0f, 0.0f, 1.0f}, {0.0f, 0.0f, 1.0f}, {0.0f, 0.0f, -1.0f},
11001 {0.0f, 0.0f, 1.0f}, {0.0f, 0.0f, -1.0f}, {0.0f, 0.0f, -1.0f},
11002 {0.0f, 0.0f, 1.0f}, {0.0f, 0.0f, 1.0f}, {0.0f, 0.0f, 1.0f},
11003 {0.0f, 0.0f, 1.0f}, {0.0f, 0.0f, 1.0f}, {0.0f, 0.0f, -1.0f},
11004 {0.0f, 0.0f, -1.0f}, {0.0f, 0.0f, -1.0f}, {0.0f, 0.0f, -1.0f}
11009 { 0.000000f, -0.000000f, 1.000000f}, { 0.000000f, 0.582244f, 0.813014f},
11010 { 0.582244f, -0.000000f, 0.813014f}, {-0.000000f, -0.582244f, 0.813014f},
11011 {-0.582244f, 0.000000f, 0.813014f}, {-0.000000f, 0.890608f, 0.454772f},
11012 { 0.890608f, 0.000000f, 0.454772f}, { 0.000000f, -0.890608f, 0.454772f},
11013 {-0.890608f, -0.000000f, 0.454772f}, { 0.000000f, 1.000000f, -0.000000f},
11014 { 1.000000f, -0.000000f, -0.000000f}, {-0.000000f, -1.000000f, -0.000000f},
11015 {-1.000000f, 0.000000f, -0.000000f}, { 0.000000f, 0.890608f, -0.454773f},
11016 { 0.890608f, -0.000000f, -0.454772f}, {-0.000000f, -0.890608f, -0.454773f},
11017 {-0.890608f, 0.000000f, -0.454773f}, { 0.000000f, 0.582244f, -0.813015f},
11018 { 0.582244f, -0.000000f, -0.813015f}, { 0.000000f, -0.582244f, -0.813015f},
11019 {-0.582243f, 0.000000f, -0.813015f}, { 0.000000f, 0.000000f, -1.000000f}
11021 static const D3DXVECTOR3 sphere_normals_area[22] =
11023 { 0.000000f, -0.000000f, 1.000000f}, {-0.215311f, 0.554931f, 0.803550f},
11024 { 0.554931f, 0.215311f, 0.803550f}, { 0.215311f, -0.554931f, 0.803550f},
11025 {-0.554931f, -0.215311f, 0.803550f}, {-0.126638f, 0.872121f, 0.472618f},
11026 { 0.872121f, 0.126638f, 0.472618f}, { 0.126638f, -0.872121f, 0.472618f},
11027 {-0.872121f, -0.126637f, 0.472618f}, { 0.000000f, 1.000000f, -0.000000f},
11028 { 1.000000f, -0.000000f, -0.000000f}, {-0.000000f, -1.000000f, -0.000000f},
11029 {-1.000000f, 0.000000f, -0.000000f}, { 0.126638f, 0.872121f, -0.472618f},
11030 { 0.872121f, -0.126638f, -0.472618f}, {-0.126638f, -0.872121f, -0.472618f},
11031 {-0.872121f, 0.126638f, -0.472618f}, { 0.215311f, 0.554931f, -0.803550f},
11032 { 0.554931f, -0.215311f, -0.803550f}, {-0.215311f, -0.554931f, -0.803550f},
11033 {-0.554931f, 0.215311f, -0.803550f}, { 0.000000f, 0.000000f, -1.000000f}
11035 static const D3DXVECTOR3 sphere_normals_equal[22] =
11037 { 0.000000f, -0.000000f, 1.000000f}, {-0.134974f, 0.522078f, 0.842150f},
11038 { 0.522078f, 0.134974f, 0.842150f}, { 0.134974f, -0.522078f, 0.842150f},
11039 {-0.522078f, -0.134974f, 0.842150f}, {-0.026367f, 0.857121f, 0.514440f},
11040 { 0.857121f, 0.026367f, 0.514440f}, { 0.026367f, -0.857121f, 0.514440f},
11041 {-0.857121f, -0.026367f, 0.514440f}, { 0.000000f, 1.000000f, -0.000000f},
11042 { 1.000000f, -0.000000f, -0.000000f}, {-0.000000f, -1.000000f, -0.000000f},
11043 {-1.000000f, 0.000000f, -0.000000f}, { 0.026367f, 0.857121f, -0.514440f},
11044 { 0.857121f, -0.026367f, -0.514440f}, {-0.026367f, -0.857121f, -0.514440f},
11045 {-0.857121f, 0.026367f, -0.514440f}, { 0.134975f, 0.522078f, -0.842150f},
11046 { 0.522078f, -0.134975f, -0.842150f}, {-0.134974f, -0.522078f, -0.842150f},
11047 {-0.522078f, 0.134974f, -0.842150f}, { 0.000000f, 0.000000f, -1.000000f}
11095 skip(
"Couldn't create test context\n");
11134 const struct compute_normals_func *
func = &compute_normals_funcs[
i];
11143 refcount = cloned_mesh->lpVtbl->Release(cloned_mesh);
11144 ok(!refcount,
"Mesh has %lu references left\n", refcount);
11153 refcount = cloned_mesh->lpVtbl->Release(cloned_mesh);
11154 ok(!refcount,
"Mesh has %lu references left\n", refcount);
11157 hr =
mesh->lpVtbl->CloneMesh(
mesh, 0, position3f_normal1f_declaration,
device, &cloned_mesh);
11163 refcount = cloned_mesh->lpVtbl->Release(cloned_mesh);
11164 ok(!refcount,
"Mesh has %lu references left\n", refcount);
11167 hr =
mesh->lpVtbl->CloneMesh(
mesh, 0, position3f_normal2f_declaration,
device, &cloned_mesh);
11173 refcount = cloned_mesh->lpVtbl->Release(cloned_mesh);
11174 ok(!refcount,
"Mesh has %lu references left\n", refcount);
11195 hr =
mesh->lpVtbl->CloneMesh(
mesh, 0, normal4f_position3f_declaration,
device, &cloned_mesh);
11206 refcount = cloned_mesh->lpVtbl->Release(cloned_mesh);
11207 ok(!refcount,
"Mesh has %lu references left\n", refcount);
11210 hr =
mesh->lpVtbl->CloneMesh(
mesh, 0, position1f_normal3f_declaration,
device, &cloned_mesh);
11221 refcount = cloned_mesh->lpVtbl->Release(cloned_mesh);
11222 ok(!refcount,
"Mesh has %lu references left\n", refcount);
11225 hr =
mesh->lpVtbl->CloneMesh(
mesh, 0, position2f_normal3f_declaration,
device, &cloned_mesh);
11236 refcount = cloned_mesh->lpVtbl->Release(cloned_mesh);
11237 ok(!refcount,
"Mesh has %lu references left\n", refcount);
11240 hr =
mesh->lpVtbl->CloneMesh(
mesh, 0, position4f_normal3f_declaration,
device, &cloned_mesh);
11251 refcount = cloned_mesh->lpVtbl->Release(cloned_mesh);
11252 ok(!refcount,
"Mesh has %lu references left\n", refcount);
11258 ok(
hr ==
D3D_OK,
"D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n",
hr);
11265 ok(
hr ==
D3D_OK,
"D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n",
hr);
11272 ok(
hr ==
D3D_OK,
"D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n",
hr);
11279 ok(
hr ==
D3D_OK,
"D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n",
hr);
11283 refcount =
mesh->lpVtbl->Release(
mesh);
11284 ok(!refcount,
"Mesh has %lu references left\n", refcount);
11286 ok(!refcount,
"Buffer has %lu references left\n", refcount);
11293 const struct compute_normals_func *
func = &compute_normals_funcs[
i];
11317 ok(
hr ==
D3D_OK,
"D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n",
hr);
11324 ok(
hr ==
D3D_OK,
"D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n",
hr);
11331 ok(
hr ==
D3D_OK,
"D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n",
hr);
11338 ok(
hr ==
D3D_OK,
"D3DXComputeTangentFrameEx returned %#lx, expected D3D_OK\n",
hr);
11342 refcount =
mesh->lpVtbl->Release(
mesh);
11343 ok(!refcount,
"Mesh has %lu references left\n", refcount);
11345 ok(!refcount,
"Buffer has %lu references left\n", refcount);
11353 ID3DXAnimationController *animation;
11357 ok(
hr ==
D3D_OK,
"Got unexpected hr returned %#lx.\n",
hr);
11359 animation = (
void*)0xdeadbeef;
11361 ok(
hr ==
D3D_OK,
"Got unexpected hr returned %#lx.\n",
hr);
11362 ok(animation == (
void*)0xdeadbeef,
"Got unexpected animation %p.\n", animation);
11364 animation = (
void*)0xdeadbeef;
11366 ok(
hr ==
D3D_OK,
"Got unexpected hr returned %#lx.\n",
hr);
11367 ok(animation == (
void*)0xdeadbeef,
"Got unexpected animation %p.\n", animation);
11369 animation = (
void*)0xdeadbeef;
11371 ok(
hr ==
D3D_OK,
"Got unexpected hr returned %#lx.\n",
hr);
11372 ok(animation == (
void*)0xdeadbeef,
"Got unexpected animation %p.\n", animation);
11374 animation = (
void*)0xdeadbeef;
11376 ok(
hr ==
D3D_OK,
"Got unexpected hr returned %#lx.\n",
hr);
11377 ok(animation == (
void*)0xdeadbeef,
"Got unexpected animation %p.\n", animation);
11380 ok(
hr ==
D3D_OK,
"Got unexpected hr returned %#lx.\n",
hr);
11382 value = animation->lpVtbl->GetMaxNumAnimationOutputs(animation);
11385 value = animation->lpVtbl->GetMaxNumAnimationSets(animation);
11388 value = animation->lpVtbl->GetMaxNumTracks(animation);
11391 value = animation->lpVtbl->GetMaxNumEvents(animation);
11394 animation->lpVtbl->Release(animation);
11397 ok(
hr ==
D3D_OK,
"Got unexpected hr returned %#lx.\n",
hr);
11399 value = animation->lpVtbl->GetMaxNumAnimationOutputs(animation);
11400 ok(
value == 100,
"Got unexpected value %u.\n",
value);
11402 value = animation->lpVtbl->GetMaxNumAnimationSets(animation);
11403 ok(
value == 101,
"Got unexpected value %u.\n",
value);
11405 value = animation->lpVtbl->GetMaxNumTracks(animation);
11406 ok(
value == 102,
"Got unexpected value %u.\n",
value);
11408 value = animation->lpVtbl->GetMaxNumEvents(animation);
11409 ok(
value == 103,
"Got unexpected value %u.\n",
value);
11411 animation->lpVtbl->Release(animation);
11416 ID3DXKeyframedAnimationSet *
set;
11418 unsigned int count;
11437 set->lpVtbl->Release(
set);
11442 static char n1[] =
"name1";
11443 static char n2[] =
"name2";
11444 static char n3[] =
"name3";
11445 static char n4[] =
"name4";
11446 static char n5[] =
"name5";
11447 static char n6[] =
"name6";
11448 static char N1[] =
"Name1";
11474 memset(&sibling, 0,
sizeof(sibling));
11476 root.pFrameSibling = &sibling;
11478 ok(
ret == &sibling,
"Unexpected frame, %p.\n",
ret);
11480 memset(&sibling2, 0,
sizeof(sibling2));
11484 ok(
ret == &sibling,
"Unexpected frame, %p.\n",
ret);
11488 ok(
ret == &sibling2,
"Unexpected frame, %p.\n",
ret);
11495 ok(
ret == &sibling,
"Unexpected frame, %p.\n",
ret);
11502 memset(&child2, 0,
sizeof(child2));
11503 memset(&child3, 0,
sizeof(child3));
11506 child.pFrameFirstChild = &child3;
11508 ok(
ret == &child2,
"Unexpected frame, %p.\n",
ret);
11512 ok(
ret == &child3,
"Unexpected frame, %p.\n",
ret);
11517 ID3DXFileData *file_data, *
ret =
NULL;
11518 ID3DXFileEnumObject *enum_obj =
NULL;
11535 if (
FAILED(enum_obj->lpVtbl->GetChildren(enum_obj, &
count)))
11540 if (
FAILED(enum_obj->lpVtbl->GetChild(enum_obj,
i, &file_data)))
11543 if (
SUCCEEDED(file_data->lpVtbl->GetType(file_data, &
guid))
11551 file_data->lpVtbl->Release(file_data);
11557 enum_obj->lpVtbl->
Release(enum_obj);
11565 static const char simple_xfile[] =
11575 static const char simple_xfile_empty[] =
11577 "Mesh { 0;; 0;; }";
11588 ID3DXSkinInfo *skin_info;
11589 ID3DXFileData *file_data;
11590 const char *bone_name;
11602 skip(
"Failed to create application window.\n");
11609 skip(
"Failed to create d3d object.\n");
11614 memset(&d3dpp, 0,
sizeof(d3dpp));
11623 skip(
"Failed to create device, hr %#lx.\n",
hr);
11628 file_data =
get_mesh_data(simple_xfile,
sizeof(simple_xfile) - 1);
11629 ok(!!file_data,
"Failed to load mesh data.\n");
11631 adjacency = materials = effects = (
void *)0xdeadbeef;
11633 skin_info = (
void *)0xdeadbeef;
11634 mesh = (
void *)0xdeadbeef;
11637 &skin_info, &
mesh);
11639 ok(!!adjacency,
"Got unexpected value %p.\n", adjacency);
11640 ok(!materials,
"Got unexpected value %p.\n", materials);
11641 ok(!effects,
"Got unexpected value %p.\n", effects);
11643 ok(!!skin_info,
"Got unexpected value %p.\n", skin_info);
11644 ok(!!
mesh,
"Got unexpected value %p.\n",
mesh);
11650 hr = skin_info->lpVtbl->GetDeclaration(skin_info,
declaration);
11654 fvf = skin_info->lpVtbl->GetFVF(skin_info);
11655 ok(fvf ==
D3DFVF_XYZ,
"Got unexpected value %lu.\n", fvf);
11657 count = skin_info->lpVtbl->GetNumBones(skin_info);
11660 influence = skin_info->lpVtbl->GetMinBoneInfluence(skin_info);
11661 ok(!influence,
"Got unexpected value %.8e.\n", influence);
11663 memset(max_influences, 0x55,
sizeof(max_influences));
11664 hr = skin_info->lpVtbl->GetMaxVertexInfluences(skin_info, max_influences);
11666 todo_wine ok(!max_influences[0],
"Got unexpected value %lu.\n", max_influences[0]);
11667 ok(max_influences[1] == 0x55555555,
"Got unexpected value %lu.\n", max_influences[1]);
11668 ok(max_influences[2] == 0x55555555,
"Got unexpected value %lu.\n", max_influences[2]);
11670 bone_name = skin_info->lpVtbl->GetBoneName(skin_info, 0);
11671 ok(!bone_name,
"Got unexpected value %p.\n", bone_name);
11673 count = skin_info->lpVtbl->GetNumBoneInfluences(skin_info, 0);
11676 count = skin_info->lpVtbl->GetNumBoneInfluences(skin_info, 1);
11679 matrix = skin_info->lpVtbl->GetBoneOffsetMatrix(skin_info, -1);
11682 matrix = skin_info->lpVtbl->GetBoneOffsetMatrix(skin_info, 0);
11685 skin_info->lpVtbl->Release(skin_info);
11687 adjacency->lpVtbl->Release(adjacency);
11688 file_data->lpVtbl->Release(file_data);
11691 file_data =
get_mesh_data(simple_xfile_empty,
sizeof(simple_xfile_empty) - 1);
11692 ok(!!file_data,
"Failed to load mesh data.\n");
11694 adjacency = materials = effects = (
void *)0xdeadbeef;
11695 count = 0xdeadbeefu;
11696 skin_info = (
void *)0xdeadbeef;
11697 mesh = (
void *)0xdeadbeef;
11700 &skin_info, &
mesh);
11702 ok(!adjacency,
"Unexpected adjacency %p.\n", adjacency);
11703 ok(!materials,
"Unexpected materials %p.\n", materials);
11704 ok(!effects,
"Unexpected effects %p.\n", effects);
11705 ok(
count == 0xdeadbeefu,
"Unexpected count %lu.\n",
count);
11706 ok(skin_info == (
void *)0xdeadbeef,
"Unexpected skin_info %p.\n", skin_info);
11709 file_data->lpVtbl->Release(file_data);
11712 ok(!refcount,
"Device has %lu references left.\n", refcount);
11725 static const struct
11733 { {-0.5f, -1.0f, 0.0f,}, {0.0f, 0.0f, 1.0f}, {-0.5f, -1.0f} },
11734 { { 0.5f, -1.0f, 0.0f,}, {0.0f, 0.0f, 1.0f}, { 0.5f, -1.0f} },
11736 { {-1.0f, 0.0f, 0.0f,}, {0.0f, 0.0f, 1.0f}, {-1.0f, 0.0f} },
11737 { { 0.0f, 0.0f, 0.0f,}, {0.0f, 0.0f, 1.0f}, { 0.0f, 0.0f} },
11738 { { 1.0f, 0.0f, 0.0f,}, {0.0f, 0.0f, 1.0f}, { 1.0f, 0.0f} },
11740 { {-0.5f, 1.0f, 0.0f,}, {0.0f, 0.0f, 1.0f}, {-0.5f, 1.0f} },
11741 { { 0.5f, 1.0f, 0.0f,}, {0.0f, 0.0f, 1.0f}, { 0.5f, 1.0f} },
11743 static const unsigned short indices[] =
11752 static const DWORD attrs[] = { 1, 2, 1, 2, 1, 2 };
11753 static const DWORD expected_adjacency[] =
11762 static const DWORD expected_adjacency_out[] =
11772 DWORD adjacency[6 * 3], adjacency_out[6 * 3];
11785 skip(
"Couldn't create test context\n");
11797 hr =
mesh->lpVtbl->UnlockVertexBuffer(
mesh);
11809 hr =
mesh->lpVtbl->UnlockAttributeBuffer(
mesh);
11812 hr =
mesh->lpVtbl->GenerateAdjacency(
mesh, 0.0f, adjacency);
11814 ok(!
memcmp(adjacency, expected_adjacency,
sizeof(adjacency)),
"data mismatch.\n");
11825 ok(!
memcmp(adjacency_out, expected_adjacency_out,
sizeof(adjacency)),
"data mismatch.\n");
HRESULT WINAPI D3DXCreateKeyframedAnimationSet(const char *name, double ticks_per_second, D3DXPLAYBACK_TYPE playback_type, UINT animation_count, UINT callback_key_count, const D3DXKEY_CALLBACK *callback_keys, ID3DXKeyframedAnimationSet **animation_set)
HRESULT WINAPI D3DXCreateAnimationController(UINT max_outputs, UINT max_sets, UINT max_tracks, UINT max_events, ID3DXAnimationController **controller)
#define STDMETHODCALLTYPE
#define D3DERR_INVALIDCALL
#define D3DFVF_TEXCOUNT_SHIFT
#define D3DFVF_LASTBETA_UBYTE4
#define D3DFVF_TEXCOUNT_MASK
#define D3DFVF_TEXCOORDSIZE4(CoordIndex)
#define D3DFVF_TEXCOORDSIZE3(CoordIndex)
#define D3DFVF_TEXCOORDSIZE2(CoordIndex)
#define D3DFVF_TEXCOORDSIZE1(CoordIndex)
#define D3DFVF_POSITION_MASK
IDirect3D9 *WINAPI Direct3DCreate9(UINT SDKVersion)
#define IDirect3DIndexBuffer9_Unlock(p)
#define IDirect3DVertexBuffer9_Unlock(p)
#define IDirect3DVertexBuffer9_Release(p)
#define IDirect3D9_CreateDevice(p, a, b, c, d, e, f)
#define IDirect3DVertexBuffer9_Lock(p, a, b, c, d)
#define IDirect3DVertexBuffer9_GetDesc(p, a)
#define IDirect3DIndexBuffer9_GetDesc(p, a)
#define IDirect3D9_Release(p)
#define IDirect3DDevice9_Release(p)
#define IDirect3DIndexBuffer9_Lock(p, a, b, c, d)
#define IDirect3DIndexBuffer9_Release(p)
@ D3DDECLUSAGE_BLENDWEIGHT
@ D3DDECLUSAGE_BLENDINDICES
#define D3DFVF_LASTBETA_D3DCOLOR
#define D3DXERR_INVALIDMESH
struct ID3DXBuffer ID3DXBuffer
D3DXVECTOR2 *WINAPI D3DXVec2Normalize(D3DXVECTOR2 *pout, const D3DXVECTOR2 *pv)
D3DXVECTOR3 *WINAPI D3DXVec3Normalize(D3DXVECTOR3 *pout, const D3DXVECTOR3 *pv)
BOOL WINAPI D3DXIntersectTri(const D3DXVECTOR3 *p0, const D3DXVECTOR3 *p1, const D3DXVECTOR3 *p2, const D3DXVECTOR3 *praypos, const D3DXVECTOR3 *praydir, float *pu, float *pv, float *pdist)
HRESULT WINAPI D3DXCreateBox(struct IDirect3DDevice9 *device, float width, float height, float depth, struct ID3DXMesh **mesh, struct ID3DXBuffer **adjacency)
static BOOL is_direction_similar(D3DXVECTOR2 *dir1, D3DXVECTOR2 *dir2, float cos_theta)
UINT WINAPI D3DXGetDeclLength(const D3DVERTEXELEMENT9 *decl)
HRESULT WINAPI D3DXCreatePolygon(struct IDirect3DDevice9 *device, float length, UINT sides, struct ID3DXMesh **mesh, struct ID3DXBuffer **adjacency)
UINT WINAPI D3DXGetFVFVertexSize(DWORD FVF)
static HRESULT create_outline(struct glyphinfo *glyph, void *raw_outline, int datasize, float max_deviation_sq, unsigned int emsquare, const struct cos_table *cos_table)
HRESULT WINAPI D3DXDeclaratorFromFVF(DWORD fvf, D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE])
HRESULT WINAPI D3DXCreateCylinder(struct IDirect3DDevice9 *device, float radius1, float radius2, float length, UINT slices, UINT stacks, struct ID3DXMesh **mesh, struct ID3DXBuffer **adjacency)
static D3DXVECTOR2 * convert_fixed_to_float(POINTFX *pt, int count, unsigned int emsquare)
HRESULT WINAPI D3DXComputeTangentFrameEx(ID3DXMesh *mesh, DWORD texture_in_semantic, DWORD texture_in_index, DWORD u_partial_out_semantic, DWORD u_partial_out_index, DWORD v_partial_out_semantic, DWORD v_partial_out_index, DWORD normal_out_semantic, DWORD normal_out_index, DWORD options, const DWORD *adjacency, float partial_edge_threshold, float singular_point_threshold, float normal_edge_threshold, ID3DXMesh **mesh_out, ID3DXBuffer **vertex_mapping)
static HRESULT add_bezier_points(struct outline *outline, const D3DXVECTOR2 *p1, const D3DXVECTOR2 *p2, const D3DXVECTOR2 *p3, float max_deviation_sq)
#define EFFECT_TABLE_ENTRY(str, field)
HRESULT WINAPI D3DXLoadMeshHierarchyFromXInMemory(const void *memory, DWORD memory_size, DWORD options, struct IDirect3DDevice9 *device, struct ID3DXAllocateHierarchy *alloc_hier, struct ID3DXLoadUserData *load_user_data, D3DXFRAME **frame_hierarchy, struct ID3DXAnimationController **anim_controller)
static void free_sincos_table(struct sincos_table *sincos_table)
HRESULT WINAPI D3DXCreateTextA(struct IDirect3DDevice9 *device, HDC hdc, const char *text, float deviation, float extrusion, struct ID3DXMesh **mesh, struct ID3DXBuffer **adjacency, GLYPHMETRICSFLOAT *glyphmetrics)
HRESULT WINAPI D3DXFVFFromDeclarator(const D3DVERTEXELEMENT9 *declaration, DWORD *fvf)
HRESULT WINAPI D3DXCreateMesh(DWORD numfaces, DWORD numvertices, DWORD options, const D3DVERTEXELEMENT9 *declaration, struct IDirect3DDevice9 *device, struct ID3DXMesh **mesh)
HRESULT WINAPI D3DXComputeBoundingBox(const D3DXVECTOR3 *pfirstposition, DWORD numvertices, DWORD dwstride, D3DXVECTOR3 *pmin, D3DXVECTOR3 *pmax)
HRESULT WINAPI D3DXOptimizeFaces(const void *indices, UINT num_faces, UINT num_vertices, BOOL indices_are_32bit, DWORD *face_remap)
HRESULT WINAPI D3DXComputeBoundingSphere(const D3DXVECTOR3 *pfirstposition, DWORD numvertices, DWORD dwstride, D3DXVECTOR3 *pcenter, float *pradius)
HRESULT WINAPI D3DXLoadSkinMeshFromXof(struct ID3DXFileData *filedata, DWORD options, struct IDirect3DDevice9 *device, struct ID3DXBuffer **adjacency_out, struct ID3DXBuffer **materials_out, struct ID3DXBuffer **effects_out, DWORD *num_materials_out, struct ID3DXSkinInfo **skin_info_out, struct ID3DXMesh **mesh_out)
BOOL WINAPI D3DXSphereBoundProbe(const D3DXVECTOR3 *center, float radius, const D3DXVECTOR3 *ray_position, const D3DXVECTOR3 *ray_direction)
static BOOL compute_sincos_table(struct sincos_table *sincos_table, float angle_start, float angle_step, int n)
static struct udec3 dword_to_udec3(DWORD d)
HRESULT WINAPI D3DXCreateSphere(struct IDirect3DDevice9 *device, float radius, UINT slices, UINT stacks, struct ID3DXMesh **mesh, struct ID3DXBuffer **adjacency)
D3DXFRAME *WINAPI D3DXFrameFind(const D3DXFRAME *root, const char *name)
static struct outline * add_outline(struct outline_array *array)
static BOOL reserve(struct dynamic_array *array, int count, int itemsize)
UINT WINAPI D3DXGetDeclVertexSize(const D3DVERTEXELEMENT9 *decl, DWORD stream_idx)
HRESULT WINAPI D3DXValidMesh(ID3DXMesh *mesh, const DWORD *adjacency, ID3DXBuffer **errors_and_warnings)
static BOOL attempt_line_merge(struct outline *outline, int pt_index, const D3DXVECTOR2 *nextpt, BOOL to_curve, const struct cos_table *table)
HRESULT WINAPI D3DXCreateTorus(struct IDirect3DDevice9 *device, float innerradius, float outerradius, UINT sides, UINT rings, struct ID3DXMesh **mesh, ID3DXBuffer **adjacency)
static struct dec3n dword_to_dec3n(DWORD d)
HRESULT WINAPI D3DXOptimizeVertices(const void *indices, UINT face_count, UINT vertex_count, BOOL indices_are_32bit, DWORD *vertex_remap)
HRESULT WINAPI D3DXCreateTextW(struct IDirect3DDevice9 *device, HDC hdc, const WCHAR *text, float deviation, float extrusion, struct ID3DXMesh **mesh_ptr, struct ID3DXBuffer **adjacency, GLYPHMETRICSFLOAT *glyphmetrics)
HRESULT WINAPI D3DXComputeNormals(struct ID3DXBaseMesh *mesh, const DWORD *adjacency)
HRESULT WINAPI D3DXLoadMeshFromXInMemory(const void *memory, DWORD memory_size, DWORD options, struct IDirect3DDevice9 *device, struct ID3DXBuffer **adjacency_out, struct ID3DXBuffer **materials_out, struct ID3DXBuffer **effects_out, DWORD *num_materials_out, struct ID3DXMesh **mesh_out)
static D3DXVECTOR2 * unit_vec2(D3DXVECTOR2 *dir, const D3DXVECTOR2 *pt1, const D3DXVECTOR2 *pt2)
HRESULT WINAPI D3DXWeldVertices(ID3DXMesh *mesh, DWORD flags, const D3DXWELDEPSILONS *epsilons, const DWORD *adjacency, DWORD *adjacency_out, DWORD *face_remap_out, ID3DXBuffer **vertex_remap_out)
HRESULT WINAPI D3DXCreateMeshFVF(DWORD face_count, DWORD vertex_count, DWORD options, DWORD fvf, struct IDirect3DDevice9 *device, struct ID3DXMesh **mesh)
HRESULT WINAPI D3DXFrameDestroy(D3DXFRAME *frame, ID3DXAllocateHierarchy *alloc_hier)
static WORD vertex_index(UINT slices, int slice, int stack)
BOOL WINAPI D3DXBoxBoundProbe(const D3DXVECTOR3 *pmin, const D3DXVECTOR3 *pmax, const D3DXVECTOR3 *prayposition, const D3DXVECTOR3 *praydirection)
HRESULT WINAPI D3DXFileCreate(ID3DXFile **d3dxfile)
static void cleanup(void)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP double __cdecl sqrt(double)
_ACRTIMP double __cdecl fabs(double)
_ACRTIMP double __cdecl sin(double)
_ACRTIMP float __cdecl cosf(float)
_ACRTIMP float __cdecl sinf(float)
_ACRTIMP float __cdecl fabsf(float)
_ACRTIMP double __cdecl cos(double)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
static char * strdup(const char *buf)
@ D3DXERR_LOADEDMESHASNODATA
enum _D3DXPLAYBACK_TYPE D3DXPLAYBACK_TYPE
#define ID3DXBuffer_GetBufferSize(p)
#define ID3DXBuffer_GetBufferPointer(p)
#define ID3DXBuffer_Release(p)
struct _D3DVECTOR D3DXVECTOR3
#define D3DXToRadian(degree)
@ D3DXTANGENT_WEIGHT_BY_AREA
@ D3DXTANGENT_CALCULATE_NORMALS
@ D3DXTANGENT_WEIGHT_EQUAL
@ D3DXTANGENT_GENERATE_IN_PLACE
@ D3DXMESHOPT_IGNOREVERTS
@ D3DXWELDEPSILONS_DONOTREMOVEVERTICES
@ D3DXWELDEPSILONS_DONOTSPLIT
@ D3DXWELDEPSILONS_WELDALL
@ D3DXWELDEPSILONS_WELDPARTIALMATCHES
#define D3DXF_FILELOAD_FROMMEMORY
GLint GLint GLsizei GLsizei GLsizei depth
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei height
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei width
GLuint GLuint GLsizei GLenum const GLvoid * indices
GLuint GLenum GLenum transform
GLenum GLenum GLenum GLenum GLenum scale
GLenum GLuint GLint GLenum face
GLboolean GLboolean GLboolean b
GLenum const GLfloat * params
GLuint GLsizei GLsizei * length
GLboolean GLboolean GLboolean GLboolean a
GLfloat GLfloat GLfloat v2
GLubyte GLubyte GLubyte GLubyte w
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
enum wined3d_data_type data_type
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
#define skip_(test, file, line,...)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
#define memcpy(s1, s2, n)
static ID3DXAllocateHierarchy alloc_hier
static void check_user_data(struct test_load_user_data *user_data, unsigned int expected_count, const struct test_user_data *expected)
static DWORD init_dec3n_dword(INT x, INT y, INT z, INT w)
static void check_generated_effects_(int line, const D3DXMATERIAL *materials, DWORD num_materials, const D3DXEFFECTINSTANCE *effects)
static BOOL new_mesh(struct mesh *mesh, DWORD number_of_vertices, DWORD number_of_faces)
static void D3DXCreateMeshFVFTest(void)
static void check_floats_(int line, const char *prefix, const float *got, const float *exp, int dim)
static void D3DXCreateSphereTest(void)
static HRESULT CALLBACK ID3DXAllocateHierarchyImpl_CreateMeshContainer(ID3DXAllocateHierarchy *iface, const char *name, const D3DXMESHDATA *mesh_data, const D3DXMATERIAL *materials, const D3DXEFFECTINSTANCE *effects, DWORD num_materials, const DWORD *adjacency, ID3DXSkinInfo *skin_info, D3DXMESHCONTAINER **new_mesh_container)
static void compare_elements(const D3DVERTEXELEMENT9 *elements, const D3DVERTEXELEMENT9 *expected_elements, unsigned int line, unsigned int test_id)
static void test_createtext(IDirect3DDevice9 *device, HDC hdc, const char *text, float deviation, float extrusion)
static void free_glyphinfo(struct glyphinfo *glyph)
static void check_vertex_components(int line, int mesh_number, int vertex_number, BYTE *got_ptr, const BYTE *exp_ptr, D3DVERTEXELEMENT9 *declaration)
static HRESULT clear_normals(ID3DXMesh *mesh)
static BOOL compare_face(face a, face b)
static void D3DXCreatePolygonTest(void)
static void D3DXCreateMeshTest(void)
#define compare_float(got, exp)
static HRESULT CALLBACK ID3DXAllocateHierarchyImpl_DestroyFrame(ID3DXAllocateHierarchy *iface, LPD3DXFRAME frame)
static BOOL compare_vec3(D3DXVECTOR3 u, D3DXVECTOR3 v)
static void test_convert_point_reps_to_adjacency(void)
static void check_colorvalue_(int line, const char *prefix, const D3DCOLORVALUE got, const D3DCOLORVALUE expected)
static void test_sphere(IDirect3DDevice9 *device, FLOAT radius, UINT slices, UINT stacks)
static BOOL compute_box(struct mesh *mesh, float width, float height, float depth)
static void D3DXGetFVFVertexSizeTest(void)
static void D3DXCreateAnimationControllerTest(void)
static struct point2d * add_point(struct outline *array)
static void test_optimize_vertices(void)
static void test_get_decl_length(void)
static void test_compute_normals(void)
static void D3DXGenerateAdjacencyTest(void)
@ USER_DATA_TYPE_MESH_CHILD
@ USER_DATA_TYPE_FRAME_CHILD
static BOOL compute_sphere(struct mesh *mesh, FLOAT radius, UINT slices, UINT stacks)
static HRESULT CALLBACK ID3DXAllocateHierarchyImpl_DestroyMeshContainer(ID3DXAllocateHierarchy *iface, LPD3DXMESHCONTAINER mesh_container)
static void check_matrix_(int line, const D3DXMATRIX *got, const D3DXMATRIX *expected)
static BOOL compute_torus(struct mesh *mesh, float innerradius, float outerradius, UINT sides, UINT rings)
static void D3DXIntersectTriTest(void)
static void test_convert_adjacency_to_point_reps(void)
static void free_outline(struct outline *outline)
static void test_mesh_optimize(void)
static HRESULT destroy_mesh_container(LPD3DXMESHCONTAINER mesh_container)
static void test_fvf_to_decl(DWORD test_fvf, const D3DVERTEXELEMENT9 expected_elements[], HRESULT expected_hr, unsigned int line, unsigned int test_id)
static struct test_load_user_data * impl_from_ID3DXLoadUserData(ID3DXLoadUserData *iface)
static void D3DXComputeBoundingSphereTest(void)
static HRESULT CALLBACK ID3DXAllocateHierarchyImpl_CreateFrame(ID3DXAllocateHierarchy *iface, const char *name, D3DXFRAME **new_frame)
#define check_materials(got, got_count, expected, expected_count)
static ID3DXAllocateHierarchyVtbl ID3DXAllocateHierarchyImpl_Vtbl
#define compare_vertex_sizes(type, exp)
static void free_mesh(struct mesh *mesh)
static void compare_normals(unsigned int line, const char *test_name, ID3DXMesh *mesh, const D3DXVECTOR3 *normals, unsigned int num_normals)
#define test_LoadMeshFromX(device, xfile_str, vertex_array, fvf, index_array, materials_array, check_adjacency)
static void check_generated_adjacency_(int line, ID3DXMesh *mesh, const DWORD *got, FLOAT epsilon)
static BOOL compute_cylinder(struct mesh *mesh, FLOAT radius1, FLOAT radius2, FLOAT length, UINT slices, UINT stacks)
#define MAX_USER_DATA_COUNT
static void print_elements(const D3DVERTEXELEMENT9 *elements)
static void check_index_buffer_(int line, ID3DXMesh *mesh, const void *indices, DWORD num_indices, DWORD index_size)
static void D3DXCreateBoxTest(void)
static void init_load_user_data(struct test_load_user_data *data)
static HRESULT STDMETHODCALLTYPE load_mesh_child_data(ID3DXLoadUserData *iface, D3DXMESHCONTAINER *mesh_container, ID3DXFileData *filedata)
static void D3DXCreateKeyframedAnimationSetTest(void)
static BOOL compare_vec4(D3DXVECTOR4 u, D3DXVECTOR4 v)
#define check_vertex_buffer(mesh, vertices, num_vertices, fvf)
static void D3DXCreateCylinderTest(void)
static void test_optimize_faces(void)
static void D3DXCreateTorusTest(void)
static void test_D3DXFrameFind(void)
static void check_materials_(int line, const D3DXMATERIAL *got, DWORD got_count, const D3DXMATERIAL *expected, DWORD expected_count)
static DWORD init_udec3_dword(UINT x, UINT y, UINT z, UINT w)
static void D3DXComputeBoundingBoxTest(void)
#define check_matrix(got, expected)
static void record_common_user_data(struct test_load_user_data *data, ID3DXFileData *filedata, enum user_data_type data_type)
static void D3DXLoadMeshTest(void)
static void D3DXCreateTextTest(void)
static void test_update_semantics(void)
static void check_vertex_buffer_(int line, ID3DXMesh *mesh, const void *vertices, DWORD num_vertices, DWORD fvf)
static HRESULT compute_normals_D3DXComputeTangentFrameEx(ID3DXMesh *mesh, const DWORD *adjacency)
static HRESULT STDMETHODCALLTYPE load_top_level_data(ID3DXLoadUserData *iface, ID3DXFileData *filedata)
static void compute_text_mesh(struct mesh *mesh, const char *text, float deviation, float extrusion, float otmEMSquare, const struct glyphinfo *glyphs)
static HRESULT compute_normals_D3DXComputeNormals(ID3DXMesh *mesh, const DWORD *adjacency)
static void test_clone_mesh(void)
static void test_get_decl_vertex_size(void)
static void D3DXBoundProbeTest(void)
static void test_LoadMeshFromX_(int line, IDirect3DDevice9 *device, const char *xfile_str, size_t xfile_strlen, const void *vertices, DWORD num_vertices, DWORD fvf, const void *indices, DWORD num_indices, size_t index_size, const D3DXMATERIAL *expected_materials, DWORD expected_num_materials, BOOL check_adjacency)
static HRESULT STDMETHODCALLTYPE load_frame_child_data(ID3DXLoadUserData *iface, D3DXFRAME *frame, ID3DXFileData *filedata)
static void test_fvf_decl_conversion(void)
static void test_weld_vertices(void)
static void compare_text_outline_mesh(const char *name, ID3DXMesh *d3dxmesh, struct mesh *mesh, size_t textlen, float extrusion, const struct glyphinfo *glyphs)
#define check_index_buffer(mesh, indices, num_indices, index_size)
static struct test_context * new_test_context(void)
static void test_valid_mesh(void)
static void test_cylinder(IDirect3DDevice9 *device, FLOAT radius1, FLOAT radius2, FLOAT length, UINT slices, UINT stacks)
static void test_decl_to_fvf(const D3DVERTEXELEMENT9 *decl, DWORD expected_fvf, HRESULT expected_hr, unsigned int line, unsigned int test_id)
static void test_box(IDirect3DDevice9 *device, float width, float height, float depth)
static void compare_mesh(const char *name, ID3DXMesh *d3dxmesh, struct mesh *mesh)
static void test_create_skin_info(void)
static BOOL compute_polygon(struct mesh *mesh, float length, unsigned int sides)
static HRESULT init_test_mesh(const DWORD num_faces, const DWORD num_vertices, const DWORD options, const D3DVERTEXELEMENT9 *declaration, IDirect3DDevice9 *device, ID3DXMesh **mesh_ptr, const void *vertices, const DWORD vertex_size, const DWORD *indices, const DWORD *attributes)
static ID3DXFileData * get_mesh_data(const void *memory, SIZE_T length)
static void free_test_context(struct test_context *test_context)
#define check_generated_effects(materials, num_materials, effects)
#define check_generated_adjacency(mesh, got, epsilon)
static void test_torus(IDirect3DDevice9 *device, float innerradius, float outerradius, UINT sides, UINT rings)
static const struct ID3DXLoadUserDataVtbl load_user_data_vtbl
static void test_load_skin_mesh_from_xof(void)
static void test_polygon(void)
static const char * test_name
static char memory[1024 *256]
static const LARGE_INTEGER *static const HANDLE const LARGE_INTEGER *static PSLIST_ENTRY PSLIST_ENTRY last
static float(__cdecl *square_half_float)(float x
_In_ ULONG _In_ ULONG Offset
static HANDLE ACCESS_MASK ULONG attributes
#define WS_OVERLAPPEDWINDOW
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualGUID(rguid1, rguid2)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI DestroyWindow(_In_ HWND)
for(i=0;i< sizeof(testsuite)/sizeof(testsuite[0]);++i) ok(call_test(testsuite[i].func)
#define D3DRM_XTEMPLATE_BYTES
unsigned char D3DRM_XTEMPLATES[]
#define D3DADAPTER_DEFAULT
#define D3DCREATE_SOFTWARE_VERTEXPROCESSING
HRESULT WINAPI D3DXCreateSkinInfo(DWORD vertex_count, const D3DVERTEXELEMENT9 *declaration, DWORD bone_count, ID3DXSkinInfo **skin_info)
HRESULT WINAPI D3DXCreateSkinInfoFVF(DWORD vertex_count, DWORD fvf, DWORD bone_count, ID3DXSkinInfo **skin_info)
wchar_t const *const size_t const buffer_size
D3DXEFFECTDEFAULTTYPE Type
LPD3DXEFFECTDEFAULT pDefaults
struct _D3DXFRAME * pFrameSibling
D3DXMATRIX TransformationMatrix
LPD3DXMESHCONTAINER pMeshContainer
struct _D3DXFRAME * pFrameFirstChild
struct outline_array outlines
GUID guids[MAX_USER_DATA_COUNT]
unsigned int num_materials
enum user_data_type data_type
Character const *const prefix
#define CONTAINING_RECORD(address, type, field)
UINT WINAPI GetOutlineTextMetricsA(_In_ HDC hdc, _In_ UINT cjCopy, _Out_writes_bytes_opt_(cjCopy) LPOUTLINETEXTMETRICA potm)
HFONT WINAPI CreateFontIndirectA(_In_ const LOGFONTA *)
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define OUT_DEFAULT_PRECIS
#define CLIP_DEFAULT_PRECIS
HFONT WINAPI CreateFontA(_In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCSTR)
BOOL WINAPI DeleteDC(_In_ HDC)
DWORD WINAPI GetGlyphOutlineA(_In_ HDC hdc, _In_ UINT uChar, _In_ UINT fuFormat, _Out_ LPGLYPHMETRICS lpgm, _In_ DWORD cjBuffer, _Out_writes_bytes_opt_(cjBuffer) LPVOID pvBuffer, _In_ CONST MAT2 *lpmat2)