25#define _USE_MATH_DEFINES
34#define CHECK_REFCOUNT(obj,rc) \
37 int count = get_refcount( (IUnknown *)obj ); \
38 ok(count == rc_new, "Invalid refcount. Expected %d got %d\n", rc_new, count); \
43 IUnknown_AddRef(
object );
44 return IUnknown_Release(
object );
49 unsigned int diff =
x >
y ?
x -
y :
y -
x;
51 return diff <= max_diff;
67#define expect_matrix(m, m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44, u) \
68 expect_matrix_(__LINE__, m, m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44, u)
84 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e, %.8e, %.8e, "
85 "%.8e, %.8e, %.8e, %.8e, %.8e, %.8e, %.8e, %.8e}, "
86 "expected {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e, %.8e, %.8e, "
87 "%.8e, %.8e, %.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
88 m[0][0],
m[0][1],
m[0][2],
m[0][3],
m[1][0],
m[1][1],
m[1][2],
m[1][3],
89 m[2][0],
m[2][1],
m[2][2],
m[2][3],
m[3][0],
m[3][1],
m[3][2],
m[3][3],
90 m11,
m12,
m13,
m14,
m21,
m22,
m23,
m24,
m31,
m32,
m33,
m34,
m41,
m42,
m43,
m44);
93#define expect_vector(v, x, y, z, u) expect_vector_(__LINE__, v, x, y, z, u)
100 ok_(__FILE__,
line)(
equal,
"Got unexpected vector {%.8e, %.8e, %.8e}, expected {%.8e, %.8e, %.8e}.\n",
101 v->x,
v->y,
v->z,
x,
y,
z);
104#define vector_eq(a, b) vector_eq_(__LINE__, a, b)
113 &&
compare_uint((c1 >> 8) & 0xff, (c2 >> 8) & 0xff, max_diff)
114 &&
compare_uint((c1 >> 16) & 0xff, (c2 >> 16) & 0xff, max_diff)
115 &&
compare_uint((c1 >> 24) & 0xff, (c2 >> 24) & 0xff, max_diff);
119 { 1.0f, 0.0f, 0.0f, 0.0f },
120 { 0.0f, 1.0f, 0.0f, 0.0f },
121 { 0.0f, 0.0f, 1.0f, 0.0f },
122 { 0.0f, 0.0f, 0.0f, 1.0f }
151 for (
i = 0;
i < 4; ++
i)
153 for (
j = 0;
j < 4; ++
j)
155 if (
m[
i][
j] > -1e-7f &&
m[
i][
j] < 1e-7f)
163 RECT r = {0, 0, 640, 480};
171#define test_class_name(a, b) test_class_name_(__LINE__, a, b)
174 char cname[64] = {0};
193 size =
sizeof(cname);
197 ok_(__FILE__,
line)(!
strcmp(cname,
name),
"Expected cname to be \"%s\", but got \"%s\".\n",
name, cname);
203 ok_(__FILE__,
line)(!
strcmp(cname,
name),
"Expected cname to be \"%s\", but got \"%s\".\n",
name, cname);
210 ok_(__FILE__,
line)(!
strcmp(cname,
"XXX"),
"Expected unchanged buffer, but got \"%s\".\n", cname);
213#define test_object_name(a) test_object_name_(__LINE__, a)
226 ok_(__FILE__,
line)(
name[0] == 0x1f,
"Unexpected buffer contents, %#x.\n",
name[0]);
246 ok_(__FILE__,
line)(
name[0] == 0x1f,
"Unexpected name \"%s\".\n",
name);
270 ok_(__FILE__,
line)(
name[0] == 0x1f,
"Got unexpected name \"%s\".\n",
name);
285 ok_(__FILE__,
line)(
name[0] == 0,
"Got unexpected name \"%s\".\n",
name);
323"Header { 1; 0; 1; }\n"
331" MeshMaterialList {\n"
334" 0.0; 1.0; 0.0; 1.0;;\n"
338" TextureFileName {\n"
351" MeshTextureCoords {\n"
386" 0.1, 0.2, 0.3, 0.4;;\n"
394"Header { 1; 0; 1; }\n"
410" MeshMaterialList {\n"
411" 3; 6; 0, 1, 1, 2, 2, 2;\n"
413" 1.0; 0.0; 0.0; 0.1;;\n"
415" 0.11; 0.12; 0.13;;\n"
416" 0.14; 0.15; 0.16;;\n"
419" 0.0; 1.0; 0.0; 0.2;;\n"
421" 0.21; 0.22; 0.23;;\n"
422" 0.24; 0.25; 0.26;;\n"
425" 0.0; 0.0; 1.0; 0.3;;\n"
427" 0.31; 0.32; 0.33;;\n"
428" 0.34; 0.35; 0.36;;\n"
438 IDirect3DRMMeshBuilder *pMeshBuilder;
439 IDirect3DRMMeshBuilder3 *meshbuilder3;
440 IDirect3DRMMesh *
mesh;
443 DWORD val1, val2, val3;
454 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx\n",
hr);
457 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMMeshBuilder interface, hr %#lx\n",
hr);
461 ok(unk == (
IUnknown *)pMeshBuilder,
"Unexpected interface pointer.\n");
462 IUnknown_Release(unk);
466 ok(unk == (
IUnknown *)pMeshBuilder,
"Unexpected interface pointer.\n");
467 IUnknown_Release(unk);
474 ok(unk == (
IUnknown *)pMeshBuilder,
"Unexpected interface pointer.\n");
475 IUnknown_Release(unk);
479 ok(unk == (
IUnknown *)pMeshBuilder,
"Unexpected interface pointer.\n");
480 IUnknown_Release(unk);
505 ok(!
strcmp(
name,
"Object"),
"Retrieved name '%s' instead of 'Object'\n",
name);
514 ok(
size == 0,
"Size should be 0 instead of %lu.\n",
size);
523 ok(
val == 4,
"Wrong number of vertices %d (must be 4)\n",
val);
526 ok(
val == 3,
"Wrong number of faces %d (must be 3)\n",
val);
529 ok(
hr ==
D3DRM_OK,
"Cannot get vertices information, hr %#lx\n",
hr);
530 ok(val1 == 4,
"Wrong number of vertices %ld (must be 4)\n", val1);
531 ok(val2 == 4,
"Wrong number of normals %ld (must be 4)\n", val2);
532 ok(val3 == 22,
"Wrong number of face data bytes %ld (must be 22)\n", val3);
536 ok(
hr ==
D3DRM_OK,
"Cannot get vertices information, hr %#lx\n",
hr);
546 ok(
hr ==
D3DRM_OK,
"Cannot get texture coordinates, hr %#lx\n",
hr);
547 ok(valu == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valu);
548 ok(valv == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valv);
552 ok(
hr ==
D3DRM_OK,
"Cannot get texture coordinates, hr %#lx\n",
hr);
553 ok(valu == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valu);
554 ok(valv == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valv);
558 ok(
hr ==
D3DRM_OK,
"Cannot get texture coordinates, hr %#lx\n",
hr);
559 ok(valu == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valu);
560 ok(valv == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valv);
564 ok(
hr ==
D3DRM_OK,
"Cannot get texture coordinates, hr %#lx\n",
hr);
565 ok(valu == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valu);
566 ok(valv == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valv);
573 ok(
hr ==
D3DRM_OK,
"Cannot set texture coordinates, hr %#lx\n",
hr);
580 ok(
hr ==
D3DRM_OK,
"Cannot get texture coordinates, hr %#lx\n",
hr);
581 ok(valu == 1.23f,
"Wrong coordinate %f (must be 1.23)\n", valu);
582 ok(valv == 3.21f,
"Wrong coordinate %f (must be 3.21)\n", valv);
587 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMMeshBuilder interface, hr %#lx\n",
hr);
597 ok(nb_groups == 0,
"GetCroupCount returned %lu\n", nb_groups);
608 ok(
val == 3,
"Wrong number of vertices %d (must be 3)\n",
val);
611 ok(
val == 1,
"Wrong number of faces %d (must be 1)\n",
val);
614 val1 = 1; val2 = 3; val3 = 8;
619 val1 = 3; val2 = 1; val3 = 8;
624 val1 = 3; val2 = 3; val3 = 1;
630 val1 = 3; val2 = 3; val3 = 8;
632 ok(
hr ==
D3DRM_OK,
"Cannot get vertices information, hr %#lx\n",
hr);
633 ok(val1 == 3,
"Wrong number of vertices %ld (must be 3)\n", val1);
634 ok(val2 == 3,
"Wrong number of normals %ld (must be 3)\n", val2);
635 ok(val3 == 8,
"Wrong number of face data bytes %ld (must be 8)\n", val3);
642 ok(
f[0] == 3 ,
"Wrong component f[0] = %ld (expected 3)\n",
f[0]);
643 ok(
f[1] == 0 ,
"Wrong component f[1] = %ld (expected 0)\n",
f[1]);
644 ok(
f[2] == 0 ,
"Wrong component f[2] = %ld (expected 0)\n",
f[2]);
645 ok(
f[3] == 1 ,
"Wrong component f[3] = %ld (expected 1)\n",
f[3]);
646 ok(
f[4] == 1 ,
"Wrong component f[4] = %ld (expected 1)\n",
f[4]);
647 ok(
f[5] == 2 ,
"Wrong component f[5] = %ld (expected 2)\n",
f[5]);
648 ok(
f[6] == 2 ,
"Wrong component f[6] = %ld (expected 2)\n",
f[6]);
649 ok(
f[7] == 0 ,
"Wrong component f[7] = %ld (expected 0)\n",
f[7]);
656 unsigned nb_vertices, nb_faces, nb_face_vertices;
658 IDirect3DRMMaterial *material = (IDirect3DRMMaterial *)0xdeadbeef;
659 IDirect3DRMTexture *
texture = (IDirect3DRMTexture *)0xdeadbeef;
663 ok(nb_groups == 1,
"GetCroupCount returned %lu.\n", nb_groups);
668 ok(nb_vertices == 3,
"Wrong number of vertices %u (must be 3)\n", nb_vertices);
669 ok(nb_faces == 1,
"Wrong number of faces %u (must be 1)\n", nb_faces);
670 ok(nb_face_vertices == 3,
"Wrong number of vertices per face %u (must be 3)\n", nb_face_vertices);
671 ok(data_size == 3,
"Wrong number of face data bytes %lu (must be 3)\n", data_size);
673 ok(
color == 0xff00ff00,
"Wrong color returned %#lx instead of %#x\n",
color, 0xff00ff00);
679 ok(material !=
NULL,
"No material present\n");
681 ok(
hr ==
D3DRM_OK,
"Failed to get emissive color, hr %#lx.\n",
hr);
682 ok(
values[0] == 0.5f,
"Got unexpected red component %.8e.\n",
values[0]);
683 ok(
values[1] == 0.5f,
"Got unexpected green component %.8e.\n",
values[1]);
684 ok(
values[2] == 0.5f,
"Got unexpected blue component %.8e.\n",
values[2]);
686 ok(
hr ==
D3DRM_OK,
"Failed to get specular color, hr %#lx.\n",
hr);
687 ok(
values[0] == 1.0f,
"Got unexpected red component %.8e.\n",
values[0]);
688 ok(
values[1] == 0.0f,
"Got unexpected green component %.8e.\n",
values[1]);
689 ok(
values[2] == 0.0f,
"Got unexpected blue component %.8e.\n",
values[2]);
691 ok(
values[0] == 30.0f,
"Got unexpected power value %.8e.\n",
values[0]);
701 ok(
hr ==
D3DRM_OK,
"Cannot get vertices information, hr %#lx\n",
hr);
702 ok(val2 == 3,
"Wrong number of normals %ld (must be 3)\n", val2);
703 ok(val1 == 3,
"Wrong number of vertices %ld (must be 3)\n", val1);
722 IDirect3DRM3 *d3drm3;
723 IDirect3DRMMeshBuilder3 *pMeshBuilder3;
730 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx\n",
hr);
734 win_skip(
"Cannot get IDirect3DRM3 interface, hr %#lx, skipping tests\n",
hr);
740 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMMeshBuilder3 interface, hr %#lx\n",
hr);
761 ok(
val == 4,
"Wrong number of vertices %d (must be 4)\n",
val);
764 ok(
val == 3,
"Wrong number of faces %d (must be 3)\n",
val);
767 ok(
hr ==
D3DRM_OK,
"Cannot get vertices information, hr %#lx\n",
hr);
768 ok(val1 == 4,
"Wrong number of vertices %ld (must be 4)\n", val1);
774 ok(
hr ==
D3DRM_OK,
"Cannot get texture coordinates, hr %#lx\n",
hr);
775 ok(valu == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valu);
776 ok(valv == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valv);
780 ok(
hr ==
D3DRM_OK,
"Cannot get texture coordinates, hr %#lx\n",
hr);
781 ok(valu == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valu);
782 ok(valv == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valv);
786 ok(
hr ==
D3DRM_OK,
"Cannot get texture coordinates, hr %#lx\n",
hr);
787 ok(valu == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valu);
788 ok(valv == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valv);
792 ok(
hr ==
D3DRM_OK,
"Cannot get texture coordinates, hr %#lx\n",
hr);
793 ok(valu == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valu);
794 ok(valv == 0.0f,
"Wrong coordinate %f (must be 0.0)\n", valv);
801 ok(
hr ==
D3DRM_OK,
"Cannot set texture coordinates, hr %#lx\n",
hr);
808 ok(
hr ==
D3DRM_OK,
"Cannot get texture coordinates, hr %#lx\n",
hr);
809 ok(valu == 1.23f,
"Wrong coordinate %f (must be 1.23)\n", valu);
810 ok(valv == 3.21f,
"Wrong coordinate %f (must be 3.21)\n", valv);
821 IDirect3DRMMesh *
mesh;
825 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx\n",
hr);
828 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMMesh interface, hr %#lx\n",
hr);
835 IUnknown_Release(unk);
839 IUnknown_Release(unk);
850 IDirect3DRM2 *d3drm2;
851 IDirect3DRM3 *d3drm3;
852 IDirect3DRMMeshBuilder2 *MeshBuilder2;
853 IDirect3DRMMeshBuilder3 *MeshBuilder3;
854 IDirect3DRMFace *face1;
855 IDirect3DRMObject *
obj;
856 IDirect3DRMFace2 *face2;
857 IDirect3DRMFaceArray *array1;
866 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx\n",
hr);
869 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMFace interface, hr %#lx\n",
hr);
872 skip(
"Cannot get IDirect3DRMFace interface, hr %#lx, skipping tests\n",
hr);
879 ok(
obj == (IDirect3DRMObject *)face1,
"Unexpected interface pointer.\n");
886 ok(!icount,
"wrong VertexCount: %i\n", icount);
892 win_skip(
"Cannot get IDirect3DRM2 interface, hr %#lx, skipping tests\n",
hr);
898 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMMeshBuilder2 interface, hr %#lx\n",
hr);
901 ok(!icount,
"wrong FaceCount: %i\n", icount);
909 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMFace interface, hr %#lx\n",
hr);
913 ok(icount == 1,
"wrong FaceCount: %i\n", icount);
920 ok(array1 !=
NULL,
"pArray = %p\n", array1);
923 IDirect3DRMFace *
face;
933 ok(!icount,
"wrong VertexCount: %i\n", icount);
952 win_skip(
"Cannot get IDirect3DRM3 interface, hr %#lx, skipping tests\n",
hr);
961 ok(!icount,
"wrong FaceCount: %i\n", icount);
971 ok(
obj == (IDirect3DRMObject *)face1,
"Unexpected interface pointer.\n");
981 ok(icount == 1,
"wrong FaceCount: %i\n", icount);
988 ok(array1 !=
NULL,
"pArray = %p\n", array1);
991 IDirect3DRMFace *
face;
1001 ok(!icount,
"wrong VertexCount: %i\n", icount);
1009 ok(icount == 4,
"Wrong number of vertices %d (must be 4)\n", icount);
1012 ok(icount == 4,
"Wrong number of normals %d (must be 4)\n", icount);
1016 ok(icount == 4,
"Wrong number of faces %d (must be 4)\n", icount);
1020 ok(
hr ==
D3DRM_OK,
"Cannot get vertices information, hr %#lx\n",
hr);
1021 ok(
count == 4,
"Wrong number of vertices %ld (must be 4)\n",
count);
1024 ok(
hr ==
D3DRM_OK,
"Cannot get normals information, hr %#lx\n",
hr);
1025 ok(
count == 4,
"Wrong number of normals %ld (must be 4)\n",
count);
1032 ok(array1 !=
NULL,
"pArray = %p\n", array1);
1035 IDirect3DRMFace *
face;
1041 ok(
hr ==
D3DRM_OK,
"Cannot get vertices information, hr %#lx\n",
hr);
1042 ok(
count == 3,
"Wrong number of vertices %ld (must be 3)\n",
count);
1060 ok(
color == 0x1f180587,
"Unexpected color %8lx.\n",
color);
1065 ok(
color == 0xff7f7f7f,
"Unexpected color %8lx.\n",
color);
1078 IDirect3DRMFrame *pFrameC;
1079 IDirect3DRMFrame *pFrameP1;
1080 IDirect3DRMFrame *pFrameP2;
1081 IDirect3DRMFrame *pFrameTmp;
1082 IDirect3DRMFrame *scene_frame;
1083 IDirect3DRMFrameArray *frame_array;
1085 IDirect3DRMVisual *visual1;
1086 IDirect3DRMVisual *visual_tmp;
1087 IDirect3DRMVisualArray *visual_array;
1088 IDirect3DRMLight *light1;
1089 IDirect3DRMLight *light_tmp;
1090 IDirect3DRMLightArray *light_array;
1091 IDirect3DRMFrame3 *frame3;
1097 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx\n",
hr);
1101 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMFrame interface, hr %#lx\n",
hr);
1104 ok(ref2 >
ref,
"Expected d3drm object to be referenced.\n");
1111 pFrameTmp = (
void*)0xdeadbeef;
1114 ok(pFrameTmp ==
NULL,
"pFrameTmp = %p\n", pFrameTmp);
1120 ok(!!frame_array,
"frame_array = %p\n", frame_array);
1127 ok(pFrameTmp ==
NULL,
"pFrameTmp = %p\n", pFrameTmp);
1132 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMFrame interface, hr %#lx\n",
hr);
1149 pFrameTmp = (
void*)0xdeadbeef;
1152 ok(pFrameTmp ==
NULL,
"pFrameTmp = %p\n", pFrameTmp);
1163 ok(scene_frame == pFrameP1,
"Expected scene frame == %p, got %p.\n", pFrameP1, scene_frame);
1168 ok(scene_frame == pFrameP1,
"Expected scene frame == %p, got %p.\n", pFrameP1, scene_frame);
1184 ok(pFrameTmp == pFrameC,
"pFrameTmp = %p\n", pFrameTmp);
1194 pFrameTmp = (
void*)0xdeadbeef;
1197 ok(pFrameTmp == pFrameP1,
"pFrameTmp = %p\n", pFrameTmp);
1204 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMFrame interface, hr %#lx\n",
hr);
1219 ok(pFrameTmp == pFrameC,
"pFrameTmp = %p\n", pFrameTmp);
1231 pFrameTmp = (
void*)0xdeadbeef;
1234 ok(pFrameTmp ==
NULL,
"pFrameTmp = %p\n", pFrameTmp);
1239 ok(scene_frame == pFrameP2,
"Expected scene frame == %p, got %p.\n", pFrameP2, scene_frame);
1244 ok(scene_frame == pFrameP2,
"Expected scene frame == %p, got %p.\n", pFrameP2, scene_frame);
1248 pFrameTmp = (
void*)0xdeadbeef;
1251 ok(pFrameTmp == pFrameP2,
"pFrameTmp = %p\n", pFrameTmp);
1271 ok(pFrameTmp == pFrameC,
"pFrameTmp = %p\n", pFrameTmp);
1288 pFrameTmp = (
void*)0xdeadbeef;
1291 ok(pFrameTmp ==
NULL,
"pFrameTmp = %p\n", pFrameTmp);
1295 pFrameTmp = (
void*)0xdeadbeef;
1298 ok(pFrameTmp ==
NULL,
"pFrameTmp = %p\n", pFrameTmp);
1318 ok(pFrameTmp == pFrameC,
"pFrameTmp = %p\n", pFrameTmp);
1322 ok(pFrameTmp == pFrameP1,
"pFrameTmp = %p\n", pFrameTmp);
1338 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMMeshBuilder interface, hr %#lx\n",
hr);
1347 visual_array =
NULL;
1356 ok(visual_tmp == visual1,
"visual_tmp = %p\n", visual_tmp);
1378 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMLight interface, hr %#lx\n",
hr);
1395 ok(light_tmp == light1,
"light_tmp = %p\n", light_tmp);
1422 ok(
SUCCEEDED(
hr),
"Failed to get IDirect3DRMFrame3 interface, hr %#lx.\n",
hr);
1484 ok(
obj == ctxt->
obj,
"called with %p, expected %p\n",
obj, ctxt->
obj);
1493 ok(
obj == ctxt->
obj,
"called with %p, expected %p\n",
obj, ctxt->
obj);
1501 IDirect3DRMObject *
obj;
1512 hr = IUnknown_QueryInterface(
unknown, &IID_IDirect3DRMObject, (
void**)&
obj);
1556 "Expected callback = %p, context = %p. Got callback = %p, context = %p.\n",
d3drm_corder[
i].
callback,
1563 hr = IUnknown_QueryInterface(
unknown, &IID_IDirect3DRMObject, (
void**)&
obj);
1593 "Expected callback = %p, context = %p. Got callback = %p, context = %p.\n",
d3drm_corder[
i].
callback,
1606 BOOL takes_d3drm_ref;
1610 { &CLSID_CDirect3DRMDevice, &IID_IDirect3DRMDevice },
1611 { &CLSID_CDirect3DRMDevice, &IID_IDirect3DRMDevice2 },
1612 { &CLSID_CDirect3DRMDevice, &IID_IDirect3DRMDevice3 },
1613 { &CLSID_CDirect3DRMDevice, &IID_IDirect3DRMWinDevice },
1614 { &CLSID_CDirect3DRMTexture, &IID_IDirect3DRMTexture },
1615 { &CLSID_CDirect3DRMTexture, &IID_IDirect3DRMTexture2 },
1616 { &CLSID_CDirect3DRMTexture, &IID_IDirect3DRMTexture3 },
1617 { &CLSID_CDirect3DRMViewport, &IID_IDirect3DRMViewport },
1618 { &CLSID_CDirect3DRMViewport, &IID_IDirect3DRMViewport2 },
1619 { &CLSID_CDirect3DRMFace, &IID_IDirect3DRMFace },
1620 { &CLSID_CDirect3DRMFace, &IID_IDirect3DRMFace2 },
1621 { &CLSID_CDirect3DRMMeshBuilder, &IID_IDirect3DRMMeshBuilder,
TRUE },
1622 { &CLSID_CDirect3DRMMeshBuilder, &IID_IDirect3DRMMeshBuilder2,
TRUE },
1623 { &CLSID_CDirect3DRMMeshBuilder, &IID_IDirect3DRMMeshBuilder3,
TRUE },
1624 { &CLSID_CDirect3DRMFrame, &IID_IDirect3DRMFrame,
TRUE },
1625 { &CLSID_CDirect3DRMFrame, &IID_IDirect3DRMFrame2,
TRUE },
1626 { &CLSID_CDirect3DRMFrame, &IID_IDirect3DRMFrame3,
TRUE },
1627 { &CLSID_CDirect3DRMLight, &IID_IDirect3DRMLight,
TRUE },
1628 { &CLSID_CDirect3DRMMaterial, &IID_IDirect3DRMMaterial,
TRUE },
1629 { &CLSID_CDirect3DRMMaterial, &IID_IDirect3DRMMaterial2,
TRUE },
1630 { &CLSID_CDirect3DRMMesh, &IID_IDirect3DRMMesh,
TRUE },
1631 { &CLSID_CDirect3DRMAnimation, &IID_IDirect3DRMAnimation,
TRUE },
1632 { &CLSID_CDirect3DRMAnimation, &IID_IDirect3DRMAnimation2,
TRUE },
1633 { &CLSID_CDirect3DRMWrap, &IID_IDirect3DRMWrap },
1635 IDirect3DRM *d3drm1;
1636 IDirect3DRM2 *d3drm2;
1637 IDirect3DRM3 *d3drm3;
1640 ULONG ref1, ref2, ref3, ref4;
1644 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
1647 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM2 interface, hr %#lx.\n",
hr);
1649 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM3 interface, hr %#lx.\n",
hr);
1675 if (
tests[
i].takes_d3drm_ref)
1676 ok(ref2 > ref1,
"Unexpected ref2 > ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
1678 ok(ref2 == ref1,
"Unexpected ref2 == ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
1681 ok(ref3 == ref1,
"Unexpected ref3 == ref1, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
1683 ok(ref4 == ref1,
"Unexpected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
1686 ok(ref2 == ref1,
"Unexpected ref2 == ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
1688 ok(ref3 == ref1,
"Unexpected ref3 == ref1, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
1690 ok(ref4 == ref1,
"Unexpected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
1698 if (
tests[
i].takes_d3drm_ref)
1699 ok(ref2 > ref1,
"Unexpected ref2 > ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
1701 ok(ref2 == ref1,
"Unexpected ref2 == ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
1703 ok(ref3 == ref1,
"Unexpected ref3 == ref1, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
1705 ok(ref4 == ref1,
"Unexpected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
1708 ok(ref2 == ref1,
"Unexpected ref2 == ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
1710 ok(ref3 == ref1,
"Unexpected ref3 == ref1, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
1712 ok(ref4 == ref1,
"Unexpected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
1717 if (
tests[
i].takes_d3drm_ref)
1718 ok(ref2 > ref1,
"Unexpected ref2 > ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
1720 ok(ref2 == ref1,
"Unexpected ref2 == ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
1722 ok(ref3 == ref1,
"Unexpected ref3 == ref1, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
1724 ok(ref4 == ref1,
"Unexpected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
1727 ok(ref2 == ref1,
"Unexpected ref2 == ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
1729 ok(ref3 == ref1,
"Unexpected ref3 == ref1, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
1731 ok(ref4 == ref1,
"Unexpected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
1744 IDirect3DRMFrame3 *frame3, *d3drm_frame3, *tmp_frame3;
1745 IDirect3DRMFrame *frame, *
d3drm_frame, *tmp_frame1;
1748 IDirectDrawClipper *clipper;
1750 IDirect3DRM *d3drm1;
1751 IDirect3DRM2 *d3drm2;
1752 IDirect3DRM3 *d3drm3;
1753 IDirect3DRMDevice *device1, *d3drm_device1;
1754 IDirect3DRMDevice3 *device3, *d3drm_device3;
1755 IDirect3DRMViewport *viewport;
1756 IDirect3DRMViewport2 *viewport2;
1760 IDirect3DRMObject *
obj, *obj2;
1765 DWORD initial_ref1, initial_ref2, initial_ref3, device_ref, frame_ref, frame_ref2, viewport_ref;
1771 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx\n",
hr);
1773 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM2 interface, hr %#lx.\n",
hr);
1775 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM3 interface, hr %#lx.\n",
hr);
1781 ok(
hr ==
DD_OK,
"Cannot get IDirectDrawClipper interface, hr %#lx\n",
hr);
1783 hr = IDirectDrawClipper_SetHWnd(clipper, 0,
window);
1784 ok(
hr ==
DD_OK,
"Cannot set HWnd to Clipper, hr %#lx\n",
hr);
1788 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMDevice interface, hr %#lx\n",
hr);
1790 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice interface, hr %#lx.\n",
hr);
1793 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMFrame interface, hr %#lx\n",
hr);
1797 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMFrame3 interface, hr %#lx.\n",
hr);
1808 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMViewport interface, hr %#lx\n",
hr);
1810 ok(ref4 > ref1,
"Expected ref4 > ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
1812 ok(ref4 == ref2,
"Expected ref4 == ref2, got ref2 = %lu, ref4 = %lu.\n", ref2, ref4);
1814 ok(ref4 == ref3,
"Expected ref4 == ref3, got ref3 = %lu, ref4 = %lu.\n", ref3, ref4);
1816 ok(ref4 == device_ref,
"Expected ref4 == device_ref, got device_ref = %lu, ref4 = %lu.\n", device_ref, ref4);
1818 ok(ref4 > frame_ref,
"Expected ref4 > frame_ref, got frame_ref = %lu, ref4 = %lu.\n", frame_ref, ref4);
1821 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice interface, hr %#lx\n",
hr);
1822 ok(device1 == d3drm_device1,
"Expected device returned = %p, got %p.\n", device1, d3drm_device1);
1841 ok(ref4 == ref1,
"Expected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
1843 ok(ref4 == ref2,
"Expected ref4 == ref2, got ref2 = %lu, ref4 = %lu.\n", ref2, ref4);
1845 ok(ref4 == ref3,
"Expected ref4 == ref3, got ref3 = %lu, ref4 = %lu.\n", ref3, ref4);
1847 ok(ref4 == device_ref,
"Expected ref4 == device_ref, got device_ref = %lu, ref4 = %lu.\n", device_ref, ref4);
1849 ok(ref4 == frame_ref,
"Expected ref4 == frame_ref, got frame_ref = %lu, ref4 = %lu.\n", frame_ref, ref4);
1852 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMViewport interface, hr %#lx\n",
hr);
1854 ok(ref4 > ref1,
"Expected ref4 > ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
1856 ok(ref4 == ref2,
"Expected ref4 == ref2, got ref2 = %lu, ref4 = %lu.\n", ref2, ref4);
1858 ok(ref4 == ref3,
"Expected ref4 == ref3, got ref3 = %lu, ref4 = %lu.\n", ref3, ref4);
1860 ok(ref4 == device_ref,
"Expected ref4 == device_ref, got device_ref = %lu, ref4 = %lu.\n", device_ref, ref4);
1862 ok(ref4 > frame_ref,
"Expected ref4 > frame_ref, got frame_ref = %lu, ref4 = %lu.\n", frame_ref, ref4);
1865 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice interface, hr %#lx\n",
hr);
1866 ok(device1 == d3drm_device1,
"Expected device returned = %p, got %p.\n", device1, d3drm_device1);
1885 ok(ref4 == ref1,
"Expected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
1887 ok(ref4 == ref2,
"Expected ref4 == ref2, got ref2 = %lu, ref4 = %lu.\n", ref2, ref4);
1889 ok(ref4 == ref3,
"Expected ref4 == ref3, got ref3 = %lu, ref4 = %lu.\n", ref3, ref4);
1891 ok(ref4 == device_ref,
"Expected ref4 == device_ref, got device_ref = %lu, ref4 = %lu.\n", device_ref, ref4);
1893 ok(ref4 == frame_ref,
"Expected ref4 == frame_ref, got frame_ref = %lu, ref4 = %lu.\n", frame_ref, ref4);
1899 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMViewport2 interface, hr %#lx\n",
hr);
1901 ok(ref4 > ref1,
"Expected ref4 > ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
1903 ok(ref4 == ref2,
"Expected ref4 == ref2, got ref2 = %lu, ref4 = %lu.\n", ref2, ref4);
1905 ok(ref4 == ref3,
"Expected ref4 == ref3, got ref3 = %lu, ref4 = %lu.\n", ref3, ref4);
1907 ok(ref4 == device_ref,
"Expected ref4 == device_ref, got device_ref = %lu, ref4 = %lu.\n", device_ref, ref4);
1909 ok(ref4 > frame_ref2,
"Expected ref4 > frame_ref2, got frame_ref2 = %lu, ref4 = %lu.\n", frame_ref2, ref4);
1912 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice3 interface, hr %#lx\n",
hr);
1913 ok(device3 == d3drm_device3,
"Expected device returned = %p, got %p.\n", device3, d3drm_device3);
1920 ok(frame3 == d3drm_frame3,
"Expected frame returned = %p, got %p.\n", frame3, d3drm_frame3);
1927 ok(d3drm_frame3 == tmp_frame3,
"Got unexpected frame %p, expected %p.\n", d3drm_frame3, tmp_frame3);
1932 ok(ref4 == ref1,
"Expected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
1934 ok(ref4 == ref2,
"Expected ref4 == ref2, got ref2 = %lu, ref4 = %lu.\n", ref2, ref4);
1936 ok(ref4 == ref3,
"Expected ref4 == ref3, got ref3 = %lu, ref4 = %lu.\n", ref3, ref4);
1938 ok(ref4 == device_ref,
"Expected ref4 == device_ref, got device_ref = %lu, ref4 = %lu.\n", device_ref, ref4);
1940 ok(ref4 == frame_ref2,
"Expected ref4 == frame_ref2, got frame_ref2 = %lu, ref4 = %lu.\n", frame_ref2, ref4);
1943 viewport = (IDirect3DRMViewport *)0xdeadbeef;
1946 ok(!viewport,
"Expected viewport returned == NULL, got %p.\n", viewport);
1947 viewport = (IDirect3DRMViewport *)0xdeadbeef;
1950 ok(!viewport,
"Expected viewport returned == NULL, got %p.\n", viewport);
1951 viewport = (IDirect3DRMViewport *)0xdeadbeef;
1954 ok(!viewport,
"Expected viewport returned == NULL, got %p.\n", viewport);
1955 viewport = (IDirect3DRMViewport *)0xdeadbeef;
1958 ok(!viewport,
"Expected viewport returned == NULL, got %p.\n", viewport);
1959 viewport = (IDirect3DRMViewport *)0xdeadbeef;
1962 ok(!viewport,
"Expected viewport returned == NULL, got %p.\n", viewport);
1966 viewport = (IDirect3DRMViewport *)0xdeadbeef;
1969 ok(!viewport,
"Expected viewport returned == NULL, got %p.\n", viewport);
1970 viewport = (IDirect3DRMViewport *)0xdeadbeef;
1973 ok(!viewport,
"Expected viewport returned == NULL, got %p.\n", viewport);
1974 viewport = (IDirect3DRMViewport *)0xdeadbeef;
1977 ok(!viewport,
"Expected viewport returned == NULL, got %p.\n", viewport);
1978 viewport = (IDirect3DRMViewport *)0xdeadbeef;
1981 ok(!viewport,
"Expected viewport returned == NULL, got %p.\n", viewport);
1982 viewport = (IDirect3DRMViewport *)0xdeadbeef;
1985 ok(!viewport,
"Expected viewport returned == NULL, got %p.\n", viewport);
1989 viewport2 = (IDirect3DRMViewport2 *)0xdeadbeef;
1992 ok(!viewport2,
"Expected viewport returned == NULL, got %p.\n", viewport2);
1993 viewport2 = (IDirect3DRMViewport2 *)0xdeadbeef;
1996 ok(!viewport2,
"Expected viewport returned == NULL, got %p.\n", viewport2);
1997 viewport2 = (IDirect3DRMViewport2 *)0xdeadbeef;
2000 ok(!viewport2,
"Expected viewport returned == NULL, got %p.\n", viewport2);
2001 viewport2 = (IDirect3DRMViewport2 *)0xdeadbeef;
2004 ok(!viewport2,
"Expected viewport returned == NULL, got %p.\n", viewport2);
2005 viewport2 = (IDirect3DRMViewport2 *)0xdeadbeef;
2008 ok(!viewport2,
"Expected viewport returned == NULL, got %p.\n", viewport2);
2013 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMViewport interface, hr %#lx\n",
hr);
2015 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
2018 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
2020 ok(ref4 > viewport_ref,
"Expected ref4 > viewport_ref, got ref4 = %lu, viewport_ref = %lu.\n", ref4, viewport_ref);
2023 ok(ref4 == viewport_ref,
"Expected ref4 == viewport_ref, got ref4 = %lu, viewport_ref = %lu.\n", ref4, viewport_ref);
2027 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
2033 ok(vp.
dwX == rc.
left,
"Expected viewport X position = %lu, got %lu.\n", rc.
left, vp.
dwX);
2034 ok(vp.
dwY == rc.
top,
"Expected viewport Y position = %lu, got %lu.\n", rc.
top, vp.
dwY);
2036 ok(vp.
dvScaleX == expected_val,
"Expected dvScaleX = %f, got %f.\n", expected_val, vp.
dvScaleX);
2037 ok(vp.
dvScaleY == expected_val,
"Expected dvScaleY = %f, got %f.\n", expected_val, vp.
dvScaleY);
2039 ok(vp.
dvMaxX == expected_val,
"Expected dvMaxX = %f, got %f.\n", expected_val, vp.
dvMaxX);
2041 ok(vp.
dvMaxY == expected_val,
"Expected dvMaxY = %f, got %f.\n", expected_val, vp.
dvMaxY);
2046 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMViewport2 interface, hr %#lx\n",
hr);
2048 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
2051 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
2053 ok(ref4 > viewport_ref,
"Expected ref4 > viewport_ref, got ref4 = %lu, viewport_ref = %lu.\n", ref4, viewport_ref);
2056 ok(ref4 == viewport_ref,
"Expected ref4 == viewport_ref, got ref4 = %lu, viewport_ref = %lu.\n", ref4, viewport_ref);
2060 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
2066 ok(vp.
dwX == rc.
left,
"Expected viewport X position = %lu, got %lu.\n", rc.
left, vp.
dwX);
2067 ok(vp.
dwY == rc.
top,
"Expected viewport Y position = %lu, got %lu.\n", rc.
top, vp.
dwY);
2069 ok(vp.
dvScaleX == expected_val,
"Expected dvScaleX = %f, got %f.\n", expected_val, vp.
dvScaleX);
2070 ok(vp.
dvScaleY == expected_val,
"Expected dvScaleY = %f, got %f.\n", expected_val, vp.
dvScaleY);
2072 ok(vp.
dvMaxX == expected_val,
"Expected dvMaxX = %f, got %f.\n", expected_val, vp.
dvMaxX);
2074 ok(vp.
dvMaxY == expected_val,
"Expected dvMaxY = %f, got %f.\n", expected_val, vp.
dvMaxY);
2079 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMViewport interface, hr %#lx\n",
hr);
2081 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
2084 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
2086 ok(ref4 > viewport_ref,
"Expected ref4 > viewport_ref, got ref4 = %lu, viewport_ref = %lu.\n", ref4, viewport_ref);
2089 ok(ref4 == viewport_ref,
"Expected ref4 == viewport_ref, got ref4 = %lu, viewport_ref = %lu.\n", ref4, viewport_ref);
2093 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
2099 ok(vp.
dwX == rc.
left,
"Expected viewport X position = %lu, got %lu.\n", rc.
left, vp.
dwX);
2100 ok(vp.
dwY == rc.
top,
"Expected viewport Y position = %lu, got %lu.\n", rc.
top, vp.
dwY);
2102 ok(vp.
dvScaleX == expected_val,
"Expected dvScaleX = %f, got %f.\n", expected_val, vp.
dvScaleX);
2103 ok(vp.
dvScaleY == expected_val,
"Expected dvScaleY = %f, got %f.\n", expected_val, vp.
dvScaleY);
2105 ok(vp.
dvMaxX == expected_val,
"Expected dvMaxX = %f, got %f.\n", expected_val, vp.
dvMaxX);
2107 ok(vp.
dvMaxY == expected_val,
"Expected dvMaxY = %f, got %f.\n", expected_val, vp.
dvMaxY);
2112 ok((IDirect3DRMObject*)viewport ==
obj,
"got object pointer %p, expected %p\n",
obj, viewport);
2119 ok(
obj == obj2,
"got object pointer %p, expected %p\n", obj2,
obj);
2120 ok((
IUnknown*)viewport != (
IUnknown*)viewport2,
"got viewport1 %p, viewport2 %p\n", viewport, viewport2);
2155 (
void **)&viewport);
2156 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMViewport interface, hr %#lx.\n",
hr);
2158 ok(ref4 == ref1,
"Expected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
2160 ok(ref4 == ref2,
"Expected ref4 == ref2, got ref2 = %lu, ref4 = %lu.\n", ref2, ref4);
2162 ok(ref4 == ref3,
"Expected ref4 == ref3, got ref3 = %lu, ref4 = %lu.\n", ref3, ref4);
2171 ok(
field == -1.0f,
"Got unexpected field %.8e.\n",
field);
2175 ok(
left == 10.0f,
"Got unexpected left %.8e.\n",
left);
2176 ok(
right == 10.0f,
"Got unexpected right %.8e.\n",
right);
2178 ok(
top == 10.0f,
"Got unexpected top %.8e.\n",
top);
2180 ok(
front == -1.0f,
"Got unexpected front %.8e\n",
front);
2182 ok(back == -1.0f,
"Got unexpected back %.8e\n", back);
2184 ok(projection == ~0
u,
"Got unexpected projection type %#x.\n", projection);
2214 ok(
SUCCEEDED(
hr),
"Cannot initialize IDirect3DRMViewport interface, hr %#lx.\n",
hr);
2216 ok(ref4 > ref1,
"Expected ref4 > ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
2218 ok(ref4 == ref2,
"Expected ref4 == ref2, got ref2 = %lu, ref4 = %lu.\n", ref2, ref4);
2220 ok(ref4 == ref3,
"Expected ref4 == ref3, got ref3 = %lu, ref4 = %lu.\n", ref3, ref4);
2222 ok(ref4 == device_ref,
"Expected ref4 == device_ref, got device_ref = %lu, ref4 = %lu.\n", device_ref, ref4);
2224 ok(ref4 > frame_ref,
"Expected ref4 > frame_ref, got frame_ref = %lu, ref4 = %lu.\n", frame_ref, ref4);
2227 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice3 interface, hr %#lx\n",
hr);
2228 ok(device1 == d3drm_device1,
"Expected device returned = %p, got %p.\n", device3, d3drm_device3);
2232 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
2235 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
2237 ok(ref4 > viewport_ref,
"Expected ref4 > viewport_ref, got ref4 = %lu, viewport_ref = %lu.\n", ref4, viewport_ref);
2240 ok(ref4 == viewport_ref,
"Expected ref4 == viewport_ref, got ref4 = %lu, viewport_ref = %lu.\n", ref4, viewport_ref);
2244 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
2250 ok(vp.
dwX == rc.
left,
"Expected viewport X position = %lu, got %lu.\n", rc.
left, vp.
dwX);
2251 ok(vp.
dwY == rc.
top,
"Expected viewport Y position = %lu, got %lu.\n", rc.
top, vp.
dwY);
2253 ok(vp.
dvScaleX == expected_val,
"Expected dvScaleX = %f, got %f.\n", expected_val, vp.
dvScaleX);
2254 ok(vp.
dvScaleY == expected_val,
"Expected dvScaleY = %f, got %f.\n", expected_val, vp.
dvScaleY);
2256 ok(vp.
dvMaxX == expected_val,
"Expected dvMaxX = %f, got %f.\n", expected_val, vp.
dvMaxX);
2258 ok(vp.
dvMaxY == expected_val,
"Expected dvMaxY = %f, got %f.\n", expected_val, vp.
dvMaxY);
2262 ok(
field == 0.5f,
"Got unexpected field %.8e.\n",
field);
2265 ok(
left == -0.5f,
"Got unexpected left %.8e.\n",
left);
2266 ok(
right == 0.5f,
"Got unexpected right %.8e.\n",
right);
2268 ok(
top == 0.5f,
"Got unexpected top %.8e.\n",
top);
2270 ok(
front == 1.0f,
"Got unexpected front %.8e.\n",
front);
2272 ok(back == 100.0f,
"Got unexpected back %.8e.\n", back);
2279 ok(
field == 1.0f,
"Got unexpected field %.8e.\n",
field);
2282 ok(
left == -1.0f,
"Got unexpected left %.8e.\n",
left);
2283 ok(
right == 1.0f,
"Got unexpected right %.8e.\n",
right);
2285 ok(
top == 1.0f,
"Got unexpected top %.8e.\n",
top);
2290 ok(
field == -1.0f,
"Got unexpected field %.8e.\n",
field);
2293 ok(
left == 5.0f,
"Got unexpected left %.8e.\n",
left);
2294 ok(
right == 3.0f,
"Got unexpected right %.8e.\n",
right);
2296 ok(
top == 0.0f,
"Got unexpected top %.8e.\n",
top);
2300 ok(
front == 2.0f,
"Got unexpected front %.8e.\n",
front);
2304 ok(back == 200.0f,
"Got unexpected back %.8e.\n", back);
2334 todo_wine ok(ref4 > ref1,
"Expected ref4 > ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
2336 ok(ref4 == ref2,
"Expected ref4 == ref2, got ref2 = %lu, ref4 = %lu.\n", ref2, ref4);
2338 ok(ref4 == ref3,
"Expected ref4 == ref3, got ref3 = %lu, ref4 = %lu.\n", ref3, ref4);
2340 ok(ref4 == device_ref,
"Expected ref4 == device_ref, got device_ref = %lu, ref4 = %lu.\n", device_ref, ref4);
2342 todo_wine ok(ref4 > frame_ref,
"Expected ref4 > frame_ref, got frame_ref = %lu, ref4 = %lu.\n", frame_ref, ref4);
2348 (
void **)&viewport2);
2349 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMViewport2 interface, hr %#lx.\n",
hr);
2351 ok(ref4 == ref1,
"Expected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
2353 ok(ref4 == ref2,
"Expected ref4 == ref2, got ref2 = %lu, ref4 = %lu.\n", ref2, ref4);
2355 ok(ref4 == ref3,
"Expected ref4 == ref3, got ref3 = %lu, ref4 = %lu.\n", ref3, ref4);
2364 ok(
field == -1.0f,
"Got unexpected field %.8e.\n",
field);
2368 ok(
left == 10.0f,
"Got unexpected left %.8e.\n",
left);
2369 ok(
right == 10.0f,
"Got unexpected right %.8e.\n",
right);
2371 ok(
top == 10.0f,
"Got unexpected top %.8e.\n",
top);
2373 ok(
front == -1.0f,
"Got unexpected front %.8e\n",
front);
2375 ok(back == -1.0f,
"Got unexpected back %.8e\n", back);
2377 ok(projection == ~0
u,
"Got unexpected projection type %#x.\n", projection);
2406 ok(
SUCCEEDED(
hr),
"Cannot initialize IDirect3DRMViewport2 interface, hr %#lx.\n",
hr);
2408 ok(ref4 == device_ref,
"Expected ref4 == device_ref, got device_ref = %lu, ref4 = %lu.\n", device_ref, ref4);
2410 ok(ref4 > frame_ref2,
"Expected ref4 > frame_ref2, got frame_ref2 = %lu, ref4 = %lu.\n", frame_ref2, ref4);
2413 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice3 interface, hr %#lx\n",
hr);
2414 ok(device3 == d3drm_device3,
"Expected device returned = %p, got %p.\n", device3, d3drm_device3);
2418 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
2421 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
2423 ok(ref4 > viewport_ref,
"Expected ref4 > viewport_ref, got ref4 = %lu, viewport_ref = %lu.\n", ref4, viewport_ref);
2426 ok(ref4 == viewport_ref,
"Expected ref4 == viewport_ref, got ref4 = %lu, viewport_ref = %lu.\n", ref4, viewport_ref);
2430 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
2436 ok(vp.
dwX == rc.
left,
"Expected viewport X position = %lu, got %lu.\n", rc.
left, vp.
dwX);
2437 ok(vp.
dwY == rc.
top,
"Expected viewport Y position = %lu, got %lu.\n", rc.
top, vp.
dwY);
2439 ok(vp.
dvScaleX == expected_val,
"Expected dvScaleX = %f, got %f.\n", expected_val, vp.
dvScaleX);
2440 ok(vp.
dvScaleY == expected_val,
"Expected dvScaleY = %f, got %f.\n", expected_val, vp.
dvScaleY);
2442 ok(vp.
dvMaxX == expected_val,
"Expected dvMaxX = %f, got %f.\n", expected_val, vp.
dvMaxX);
2444 ok(vp.
dvMaxY == expected_val,
"Expected dvMaxY = %f, got %f.\n", expected_val, vp.
dvMaxY);
2448 ok(
field == 0.5f,
"Got unexpected field %.8e.\n",
field);
2451 ok(
left == -0.5f,
"Got unexpected left %.8e.\n",
left);
2452 ok(
right == 0.5f,
"Got unexpected right %.8e.\n",
right);
2454 ok(
top == 0.5f,
"Got unexpected top %.8e.\n",
top);
2456 ok(
front == 1.0f,
"Got unexpected front %.8e.\n",
front);
2458 ok(back == 100.0f,
"Got unexpected back %.8e.\n", back);
2465 ok(
field == 1.0f,
"Got unexpected field %.8e.\n",
field);
2468 ok(
left == -1.0f,
"Got unexpected left %.8e.\n",
left);
2469 ok(
right == 1.0f,
"Got unexpected right %.8e.\n",
right);
2471 ok(
top == 1.0f,
"Got unexpected top %.8e.\n",
top);
2476 ok(
field == -1.0f,
"Got unexpected field %.8e.\n",
field);
2479 ok(
left == 5.0f,
"Got unexpected left %.8e.\n",
left);
2480 ok(
right == 3.0f,
"Got unexpected right %.8e.\n",
right);
2482 ok(
top == 0.0f,
"Got unexpected top %.8e.\n",
top);
2486 ok(
front == 2.0f,
"Got unexpected front %.8e.\n",
front);
2490 ok(back == 200.0f,
"Got unexpected back %.8e.\n", back);
2520 todo_wine ok(ref4 > ref1,
"Expected ref4 > ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
2522 ok(ref4 == ref2,
"Expected ref4 == ref2, got ref2 = %lu, ref4 = %lu.\n", ref2, ref4);
2524 ok(ref4 == ref3,
"Expected ref4 == ref3, got ref3 = %lu, ref4 = %lu.\n", ref3, ref4);
2526 ok(ref4 == device_ref,
"Expected ref4 == device_ref, got device_ref = %lu, ref4 = %lu.\n", device_ref, ref4);
2528 todo_wine ok(ref4 > frame_ref2,
"Expected ref4 > frame_ref2, got frame_ref2 = %lu, ref4 = %lu.\n", frame_ref2, ref4);
2533 ok(ref4 > initial_ref1,
"Expected ref4 > initial_ref1, got initial_ref1 = %lu, ref4 = %lu.\n", initial_ref1, ref4);
2535 ok(ref4 == initial_ref2,
"Expected ref4 == initial_ref2, got initial_ref2 = %lu, ref4 = %lu.\n", initial_ref2, ref4);
2537 ok(ref4 == initial_ref3,
"Expected ref4 == initial_ref3, got initial_ref3 = %lu, ref4 = %lu.\n", initial_ref3, ref4);
2539 ok(ref4 == frame_ref,
"Expected ref4 == frame_ref, got frame_ref = %lu, ref4 = %lu.\n", frame_ref, ref4);
2541 ok(ref4 == frame_ref2,
"Expected ref4 == frame_ref2, got frame_ref2 = %lu, ref4 = %lu.\n", frame_ref2, ref4);
2546 ok(ref4 > initial_ref1,
"Expected ref4 > initial_ref1, got initial_ref1 = %lu, ref4 = %lu.\n", initial_ref1, ref4);
2548 ok(ref4 == initial_ref2,
"Expected ref4 == initial_ref2, got initial_ref2 = %lu, ref4 = %lu.\n", initial_ref2, ref4);
2550 ok(ref4 == initial_ref3,
"Expected ref4 == initial_ref3, got initial_ref3 = %lu, ref4 = %lu.\n", initial_ref3, ref4);
2555 ok(ref4 == initial_ref1,
"Expected ref4 == initial_ref1, got initial_ref1 = %lu, ref4 = %lu.\n", initial_ref1, ref4);
2557 ok(ref4 == initial_ref2,
"Expected ref4 == initial_ref2, got initial_ref2 = %lu, ref4 = %lu.\n", initial_ref2, ref4);
2559 ok(ref4 == initial_ref3,
"Expected ref4 == initial_ref3, got initial_ref3 = %lu, ref4 = %lu.\n", initial_ref3, ref4);
2560 IDirectDrawClipper_Release(clipper);
2570 IDirect3DRMObject *
object;
2573 IDirect3DRMLight *
light;
2578 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx\n",
hr);
2581 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMLight interface, hr %#lx\n",
hr);
2609 ok(
color == 0xffc0c0c0,
"Got unexpected color 0x%08lx.\n",
color);
2625 ok(
color == 0xffc0c0c0,
"Got unexpected color 0x%08lx.\n",
color);
2636 IDirect3DRM3 *d3drm3;
2637 IDirect3DRMMaterial2 *material2;
2641 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx\n",
hr);
2645 win_skip(
"Cannot get IDirect3DRM3 interface, hr %#lx, skipping tests\n",
hr);
2651 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMMaterial2 interface, hr %#lx\n",
hr);
2657 ok(
r == 18.5f,
"wrong power (%f)\n",
r);
2661 ok(
r == 0.0f &&
g == 0.0f &&
b == 0.0f,
"wrong emissive r=%f g=%f b=%f, expected r=0.0 g=0.0 b=0.0\n",
r,
g,
b);
2665 ok(
r == 1.0f &&
g == 1.0f &&
b == 1.0f,
"wrong specular r=%f g=%f b=%f, expected r=1.0 g=1.0 b=1.0\n",
r,
g,
b);
2669 ok(
r == 0.0f &&
g == 0.0f &&
b == 0.0f,
"wrong ambient r=%f g=%f b=%f, expected r=0.0 g=0.0 b=0.0\n",
r,
g,
b);
2674 ok(
r == 5.87f,
"wrong power (%f)\n",
r);
2680 ok(
r == 0.5f &&
g == 0.5f &&
b == 0.5f,
"wrong emissive r=%f g=%f b=%f, expected r=0.5 g=0.5 b=0.5\n",
r,
g,
b);
2686 ok(
r == 0.6f &&
g == 0.6f &&
b == 0.6f,
"wrong specular r=%f g=%f b=%f, expected r=0.6 g=0.6 b=0.6\n",
r,
g,
b);
2692 ok(
r == 0.7f &&
g == 0.7f &&
b == 0.7f,
"wrong ambient r=%f g=%f b=%f, expected r=0.7 g=0.7 b=0.7\n",
r,
g,
b);
2703 IDirect3DRM *d3drm1;
2704 IDirect3DRM2 *d3drm2;
2705 IDirect3DRM3 *d3drm3;
2706 IDirect3DRMTexture *texture1;
2707 IDirect3DRMTexture2 *texture2;
2708 IDirect3DRMTexture3 *texture3;
2709 IDirectDrawSurface *surface;
2710 LONG decalx, decaly;
2711 DWORD colors, shades;
2719 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000, 0,
NULL
2725 0x000000ff, 0x0000ff00, 0x00ff0000, 0, 0,
NULL
2731 0x00000000, 0x00000000, 0x00000000, 0, 2, (
void *)0xcafebabe
2735 DWORD pixel[4] = { 20000, 30000, 10000, 0 };
2736 ULONG ref1, ref2, ref3, ref4;
2743 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM2 interface, hr %#lx.\n",
hr);
2746 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM3 interface, hr %#lx.\n",
hr);
2749 texture1 = (IDirect3DRMTexture *)0xdeadbeef;
2752 ok(!texture1,
"Expected texture returned == NULL, got %p.\n", texture1);
2756 texture2 = (IDirect3DRMTexture2 *)0xdeadbeef;
2759 ok(!texture2,
"Expected texture returned == NULL, got %p.\n", texture2);
2763 texture3 = (IDirect3DRMTexture3 *)0xdeadbeef;
2766 ok(!texture3,
"Expected texture returned == NULL, got %p.\n", texture3);
2772 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture interface, hr %#lx\n",
hr);
2774 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture2 interface, hr %#lx\n",
hr);
2776 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture3 interface, hr %#lx\n",
hr);
2782 testimg.palette = (
void *)0xdeadbeef;
2783 testimg.palette_size = 0x39;
2785 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture interface, hr %#lx\n",
hr);
2787 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture2 interface, hr %#lx\n",
hr);
2789 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture3 interface, hr %#lx\n",
hr);
2796 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture interface, hr %#lx\n",
hr);
2798 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture2 interface, hr %#lx\n",
hr);
2800 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture3 interface, hr %#lx\n",
hr);
2806 texture1 = (IDirect3DRMTexture *)0xdeadbeef;
2809 ok(!texture1,
"Expected texture == NULL, got %p.\n", texture1);
2810 texture2 = (IDirect3DRMTexture2 *)0xdeadbeef;
2813 ok(!texture2,
"Expected texture == NULL, got %p.\n", texture2);
2814 texture3 = (IDirect3DRMTexture3 *)0xdeadbeef;
2817 ok(!texture3,
"Expected texture == NULL, got %p.\n", texture3);
2853 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture interface, hr %#lx\n",
hr);
2855 ok(ref2 > ref1,
"expected ref2 > ref1, got ref1 = %lu , ref2 = %lu.\n", ref1, ref2);
2857 ok(ref3 == ref1,
"expected ref3 == ref1, got ref1 = %lu , ref3 = %lu.\n", ref1, ref3);
2859 ok(ref4 == ref1,
"expected ref4 == ref1, got ref1 = %lu , ref4 = %lu.\n", ref1, ref4);
2861 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture2 interface, hr %#lx\n",
hr);
2863 ok(ref2 > ref1 + 1,
"expected ref2 > (ref1 + 1), got ref1 = %lu , ref2 = %lu.\n", ref1, ref2);
2865 ok(ref3 == ref1,
"expected ref3 == ref1, got ref1 = %lu , ref3 = %lu.\n", ref1, ref3);
2867 ok(ref4 == ref1,
"expected ref4 == ref1, got ref1 = %lu , ref4 = %lu.\n", ref1, ref4);
2869 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture3 interface, hr %#lx\n",
hr);
2871 ok(ref2 > ref1 + 2,
"expected ref2 > (ref1 + 2), got ref1 = %lu , ref2 = %lu.\n", ref1, ref2);
2873 ok(ref3 == ref1,
"expected ref3 == ref1, got ref1 = %lu , ref3 = %lu.\n", ref1, ref3);
2875 ok(ref4 == ref1,
"expected ref4 == ref1, got ref1 = %lu , ref4 = %lu.\n", ref1, ref4);
2894 ok(decalx == 0,
"got %ld.\n", decalx);
2895 ok(decaly == 0,
"got %ld.\n", decaly);
2902 ok(decalx == 1,
"got %ld.\n", decalx);
2903 ok(decaly == 1,
"got %ld.\n", decaly);
2909 ok(colors == 8,
"got %ld.\n", colors);
2915 ok(colors == 256,
"got %ld.\n", colors);
2921 ok(shades == 16,
"got %ld.\n", shades);
2927 ok(shades == 8,
"got %ld.\n", shades);
2933 ok(shades == 11,
"got %ld.\n", shades);
2955 ok(transparency ==
FALSE,
"Got %d.\n", transparency);
2961 ok(transparency ==
TRUE,
"Got %d.\n", transparency);
2967 ok(!!d3drm_img,
"Failed to get image.\n");
2968 ok(d3drm_img == &initimg,
"Expected image returned == %p, got %p.\n", &initimg, d3drm_img);
2972 ok(ref2 - 2 == ref1,
"expected (ref2 - 2) == ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
2974 ok(ref3 == ref1,
"expected ref3 == ref1, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
2976 ok(ref4 == ref1,
"expected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
2980 ok(!!d3drm_img,
"Failed to get image.\n");
2981 ok(d3drm_img == &initimg,
"Expected image returned == %p, got %p.\n", &initimg, d3drm_img);
2985 ok(ref2 - 1 == ref1,
"expected (ref2 - 1) == ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
2987 ok(ref3 == ref1,
"expected ref3 == ref1, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
2989 ok(ref4 == ref1,
"expected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
2993 ok(!!d3drm_img,
"Failed to get image.\n");
2994 ok(d3drm_img == &initimg,
"Expected image returned == %p, got %p.\n", &initimg, d3drm_img);
2998 ok(ref2 == ref1,
"expected ref2 == ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
3000 ok(ref3 == ref1,
"expected ref3 == ref1, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
3002 ok(ref4 == ref1,
"expected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
3007 testimg.palette =
NULL;
3008 testimg.palette_size = 0;
3010 (
void **)&texture2);
3011 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture2 interface, hr %#lx.\n",
hr);
3013 (
void **)&texture3);
3014 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture3 interface, hr %#lx.\n",
hr);
3016 ok(
SUCCEEDED(
hr),
"Cannot initialize IDirect3DRMTexture2 interface, hr %#lx\n",
hr);
3018 ok(
SUCCEEDED(
hr),
"Cannot initialize IDirect3DRMTexture3 interface, hr %#lx\n",
hr);
3023 testimg.palette = (
void *)0xdeadbeef;
3024 testimg.palette_size = 0x39;
3026 (
void **)&texture2);
3027 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture2 interface, hr %#lx.\n",
hr);
3029 (
void **)&texture3);
3030 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture3 interface, hr %#lx.\n",
hr);
3032 ok(
SUCCEEDED(
hr),
"Cannot initialize IDirect3DRMTexture2 interface, hr %#lx\n",
hr);
3034 ok(
SUCCEEDED(
hr),
"Cannot initialize IDirect3DRMTexture3 interface, hr %#lx\n",
hr);
3039 (
void **)&texture2);
3040 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture2 interface, hr %#lx.\n",
hr);
3045 ok(ref3 == ref2,
"expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
3048 (
void **)&texture3);
3049 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture3 interface, hr %#lx.\n",
hr);
3054 ok(ref3 == ref2,
"expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
3089 ok(
SUCCEEDED(
hr),
"Cannot initialize IDirect3DRMTexture2 from image, hr %#lx.\n",
hr);
3091 ok(ref2 > ref1,
"expected ref2 > ref1, got ref1 = %lu , ref2 = %lu.\n", ref1, ref2);
3093 ok(ref3 == ref1,
"expected ref3 == ref1, got ref1 = %lu , ref3 = %lu.\n", ref1, ref3);
3095 ok(ref4 == ref1,
"expected ref4 == ref1, got ref1 = %lu , ref4 = %lu.\n", ref1, ref4);
3103 ok(!!d3drm_img,
"Failed to get image.\n");
3104 ok(d3drm_img == &initimg,
"Expected image returned == %p, got %p.\n", &initimg, d3drm_img);
3107 ok(ref2 == ref1,
"expected ref2 == ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
3109 ok(ref3 == ref1,
"expected ref3 == ref1, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
3111 ok(ref4 == ref1,
"expected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
3115 ok(
SUCCEEDED(
hr),
"Cannot initialize IDirect3DRMTexture3 from image, hr %#lx.\n",
hr);
3117 ok(ref2 > ref1,
"expected ref2 > ref1, got ref1 = %lu , ref2 = %lu.\n", ref1, ref2);
3119 ok(ref3 == ref1,
"expected ref3 == ref1, got ref1 = %lu , ref3 = %lu.\n", ref1, ref3);
3121 ok(ref4 == ref1,
"expected ref4 == ref1, got ref1 = %lu , ref4 = %lu.\n", ref1, ref4);
3128 ok(!!d3drm_img,
"Failed to get image.\n");
3129 ok(d3drm_img == &initimg,
"Expected image returned == %p, got %p.\n", &initimg, d3drm_img);
3132 ok(ref2 == ref1,
"expected ref2 == ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
3134 ok(ref3 == ref1,
"expected ref3 == ref1, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
3136 ok(ref4 == ref1,
"expected ref4 == ref1, got ref1 = %lu, ref4 = %lu.\n", ref1, ref4);
3145 IDirectDrawClipper *pClipper;
3148 IDirect3DRMDevice *
device;
3149 IDirect3DRMWinDevice *win_device;
3158 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx\n",
hr);
3161 ok(
hr ==
DD_OK,
"Cannot get IDirectDrawClipper interface, hr %#lx\n",
hr);
3163 hr = IDirectDrawClipper_SetHWnd(pClipper, 0,
window);
3164 ok(
hr ==
DD_OK,
"Cannot set HWnd to Clipper, hr %#lx\n",
hr);
3168 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMDevice interface, hr %#lx\n",
hr);
3176 win_skip(
"Cannot get IDirect3DRMWinDevice interface, hr %#lx, skipping tests\n",
hr);
3186 IDirectDrawClipper_Release(pClipper);
3194 IDirect3DRMFrame *frame, *subframe;
3209 1.0f, 0.0f, 0.0f, 0.0f,
3210 0.0f, 1.0f, 0.0f, 0.0f,
3211 0.0f, 0.0f, 1.0f, 0.0f,
3212 0.0f, 0.0f, 0.0f, 1.0f, 0);
3215 add_matrix[3][0] = 3.0f;
3216 add_matrix[3][1] = 3.0f;
3217 add_matrix[3][2] = 3.0f;
3220 2.0f, 0.0f, 0.0f, 0.0f,
3221 0.0f, 2.0f, 0.0f, 0.0f,
3222 0.0f, 0.0f, 2.0f, 0.0f,
3223 0.0f, 0.0f, 0.0f, 1.0f);
3229 1.0f, 0.0f, 0.0f, 0.0f,
3230 0.0f, 1.0f, 0.0f, 0.0f,
3231 0.0f, 0.0f, 1.0f, 0.0f,
3232 3.0f, 3.0f, 3.0f, 1.0f, 1);
3235 2.0f, 0.0f, 0.0f, 0.0f,
3236 0.0f, 2.0f, 0.0f, 0.0f,
3237 0.0f, 0.0f, 2.0f, 0.0f,
3238 0.0f, 0.0f, 0.0f, 1.0f);
3244 2.0f, 0.0f, 0.0f, 0.0f,
3245 0.0f, 2.0f, 0.0f, 0.0f,
3246 0.0f, 0.0f, 2.0f, 0.0f,
3247 6.0f, 6.0f, 6.0f, 1.0f, 1);
3250 2.0f, 0.0f, 0.0f, 0.0f,
3251 0.0f, 2.0f, 0.0f, 0.0f,
3252 0.0f, 0.0f, 2.0f, 0.0f,
3253 0.0f, 0.0f, 0.0f, 1.0f);
3259 2.0f, 0.0f, 0.0f, 0.0f,
3260 0.0f, 2.0f, 0.0f, 0.0f,
3261 0.0f, 0.0f, 2.0f, 0.0f,
3262 3.0f, 3.0f, 3.0f, 1.0f, 1);
3264 add_matrix[3][3] = 2.0f;
3269 2.0f, 0.0f, 0.0f, 0.0f,
3270 0.0f, 2.0f, 0.0f, 0.0f,
3271 0.0f, 0.0f, 2.0f, 0.0f,
3272 0.0f, 0.0f, 0.0f, 1.0f);
3278 1.0f, 0.0f, 0.0f, 0.0f,
3279 0.0f, 1.0f, 0.0f, 0.0f,
3280 0.0f, 0.0f, 1.0f, 0.0f,
3281 3.0f, 3.0f, 3.0f, 1.0f, 1);
3284 2.0f, 0.0f, 0.0f, 0.0f,
3285 0.0f, 2.0f, 0.0f, 0.0f,
3286 0.0f, 0.0f, 2.0f, 0.0f,
3287 0.0f, 0.0f, 0.0f, 1.0f);
3293 2.0f, 0.0f, 0.0f, 0.0f,
3294 0.0f, 2.0f, 0.0f, 0.0f,
3295 0.0f, 0.0f, 2.0f, 0.0f,
3296 6.0f, 6.0f, 6.0f, 1.0f, 1);
3299 2.0f, 0.0f, 0.0f, 0.0f,
3300 0.0f, 2.0f, 0.0f, 0.0f,
3301 0.0f, 0.0f, 2.0f, 0.0f,
3302 0.0f, 0.0f, 0.0f, 1.0f);
3308 2.0f, 0.0f, 0.0f, 0.0f,
3309 0.0f, 2.0f, 0.0f, 0.0f,
3310 0.0f, 0.0f, 2.0f, 0.0f,
3311 3.0f, 3.0f, 3.0f, 1.0f, 1);
3314 1.0f, 0.0f, 0.0f, 0.0f,
3315 0.0f, 1.0f, 0.0f, 0.0f,
3316 0.0f, 0.0f, 1.0f, 0.0f,
3317 3.0f, 3.0f, 3.0f, 1.0f);
3323 2.0f, 0.0f, 0.0f, 0.0f,
3324 0.0f, 2.0f, 0.0f, 0.0f,
3325 0.0f, 0.0f, 2.0f, 0.0f,
3326 0.0f, 0.0f, 0.0f, 1.0f, 1);
3329 1.0f, 0.0f, 0.0f, 0.0f,
3330 0.0f, 1.0f, 0.0f, 0.0f,
3331 0.0f, 0.0f, 1.0f, 0.0f,
3332 3.0f, 3.0f, 3.0f, 1.0f);
3338 2.0f, 0.0f, 0.0f, 0.0f,
3339 0.0f, 2.0f, 0.0f, 0.0f,
3340 0.0f, 0.0f, 2.0f, 0.0f,
3341 3.0f, 3.0f, 3.0f, 1.0f, 1);
3344 1.0f, 0.0f, 0.0f, 0.0f,
3345 0.0f, 1.0f, 0.0f, 0.0f,
3346 0.0f, 0.0f, 1.0f, 0.0f,
3347 3.0f, 3.0f, 3.0f, 1.0f);
3353 2.0f, 0.0f, 0.0f, 0.0f,
3354 0.0f, 2.0f, 0.0f, 0.0f,
3355 0.0f, 0.0f, 2.0f, 0.0f,
3356 6.0f, 6.0f, 6.0f, 1.0f, 1);
3359 1.0f, 0.0f, 0.0f, 0.0f,
3360 0.0f, 1.0f, 0.0f, 0.0f,
3361 0.0f, 0.0f, 1.0f, 0.0f,
3362 3.0f, 3.0f, 3.0f, 1.0f);
3368 1.0f, 0.0f, 0.0f, 0.0f,
3369 0.0f, 0.0f, 1.0f, 0.0f,
3370 0.0f, -1.0f, 0.0f, 0.0f,
3371 0.0f, 0.0f, 0.0f, 1.0f, 1);
3374 1.0f, 0.0f, 0.0f, 0.0f,
3375 0.0f, 1.0f, 0.0f, 0.0f,
3376 0.0f, 0.0f, 1.0f, 0.0f,
3377 3.0f, 3.0f, 3.0f, 1.0f);
3384 1.0f, 0.0f, 0.0f, 0.0f,
3385 0.0f, 0.0f, 1.0f, 0.0f,
3386 0.0f, -1.0f, 0.0f, 0.0f,
3387 3.0f, 3.0f, 3.0f, 1.0f, 1);
3390 1.0f, 0.0f, 0.0f, 0.0f,
3391 0.0f, 1.0f, 0.0f, 0.0f,
3392 0.0f, 0.0f, 1.0f, 0.0f,
3393 3.0f, 3.0f, 3.0f, 1.0f);
3400 1.0f, 0.0f, 0.0f, 0.0f,
3401 0.0f, 0.0f, 1.0f, 0.0f,
3402 0.0f, -1.0f, 0.0f, 0.0f,
3403 3.0f, -3.0f, 3.0f, 1.0f, 1);
3411 0.0f, 1.0f, 0.0f, 0.0f,
3412 -1.0f, 0.0f, 0.0f, 0.0f,
3413 0.0f, 0.0f, 1.0f, 0.0f,
3414 0.0f, 0.0f, 0.0f, 1.0f, 1);
3422 1.0f, 0.0f, 0.0f, 0.0f,
3423 0.0f, 0.0f, 1.0f, 0.0f,
3424 0.0f, -1.0f, 0.0f, 0.0f,
3425 0.0f, 0.0f, 0.0f, 1.0f, 1);
3428 2.0f, 0.0f, 0.0f, 0.0f,
3429 0.0f, 4.0f, 0.0f, 0.0f,
3430 0.0f, 0.0f, 8.0f, 0.0f,
3431 64.0f, 64.0f, 64.0f, 1.0f);
3435 1.0f, 0.0f, 0.0f, 0.0f,
3436 0.0f, 1.0f, 0.0f, 0.0f,
3437 0.0f, 0.0f, 1.0f, 0.0f,
3438 11.0f, 11.0f, 11.0f, 1.0f);
3457 &IID_IDirect3DRMMeshBuilder,
3458 &IID_IDirect3DRMMeshBuilder,
3459 &IID_IDirect3DRMFrame,
3460 &IID_IDirect3DRMMaterial
3465 ok(
object !=
NULL,
"Arg 1 should not be null\n");
3467 ok(
arg == (
void *)0xdeadbeef,
"Arg 3 should be 0xdeadbeef (got %p)\n",
arg);
3476 const GUID* req_refiids[] = { &IID_IDirect3DRMMeshBuilder, &IID_IDirect3DRMFrame, &IID_IDirect3DRMMaterial };
3479 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx\n",
hr);
3496 IDirect3DRMFrame *frame;
3497 IDirect3DRMVisualArray *
array;
3498 IDirect3DRMVisual *visual;
3509 ok(
size == 1,
"Wrong size %lu returned, expected 1\n",
size);
3537 { 4, 3, 3, 9, 0x4c0000ff, 30.0f, { 0.31f, 0.32f, 0.33f }, { 0.34f, 0.35f, 0.36f } },
3538 { 4, 2, 3, 6, 0x3300ff00, 20.0f, { 0.21f, 0.22f, 0.23f }, { 0.24f, 0.25f, 0.26f } },
3539 { 3, 1, 3, 3, 0x19ff0000, 10.0f, { 0.11f, 0.12f, 0.13f }, { 0.14f, 0.15f, 0.16f } }
3547 const GUID *req_refiids[] = { &IID_IDirect3DRMFrame };
3548 IDirect3DRMMesh *
mesh;
3550 IDirect3DRMMaterial *material;
3559 hr =
IDirect3DRM_Load(
d3drm, &
info,
NULL, (
GUID**)req_refiids, 1,
D3DRMLOAD_FROMMEMORY,
object_load_callback_frame, (
void*)0xdeadbeef,
NULL,
NULL,
NULL);
3566 ok(
size == 3,
"Unexpected count %lu.\n",
size);
3589 ok(material !=
NULL,
"No material.\n");
3631 ULONG refcount, expected_refcount;
3636 for (
i = 0;
i < entry_count; ++
i)
3638 hr = IUnknown_QueryInterface(base_iface,
tests[
i].iid, (
void **)&iface1);
3642 for (
j = 0;
j < entry_count; ++
j)
3644 hr = IUnknown_QueryInterface(iface1,
tests[
j].iid, (
void **)&iface2);
3648 expected_refcount = 0;
3650 ++expected_refcount;
3652 ++expected_refcount;
3653 refcount = IUnknown_Release(iface2);
3654 ok(refcount == expected_refcount,
"Got refcount %lu for test \"%s\" %u, %u, expected %lu.\n",
3657 ok(iface1 == iface2,
3658 "Expected iface1 == iface2 for test \"%s\" %u, %u. Got iface1 = %p, iface 2 = %p.\n",
3661 ok(iface1 != iface2,
3662 "Expected iface1 != iface2 for test \"%s\" %u, %u. Got iface1 == iface2 == %p.\n",
3667 expected_refcount = 0;
3669 ++expected_refcount;
3670 refcount = IUnknown_Release(iface1);
3671 ok(refcount == expected_refcount,
"Got refcount %lu for test \"%s\" %u, expected %lu.\n",
3681 { &IID_IDirect3DRM3, &IID_IDirect3DRM3, &IID_IDirect3DRM3,
S_OK },
3682 { &IID_IDirect3DRM2, &IID_IDirect3DRM2, &IID_IDirect3DRM2,
S_OK },
3683 { &IID_IDirect3DRM, &IID_IDirect3DRM, &IID_IDirect3DRM,
S_OK },
3754 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx\n",
hr);
3834 IDirect3DRM *d3drm1;
3835 IDirect3DRM2 *d3drm2;
3836 IDirect3DRM3 *d3drm3;
3837 IDirect3DRMFrame *frame1;
3838 IDirect3DRMFrame2 *frame2;
3839 IDirect3DRMFrame3 *frame3;
3843 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx\n",
hr);
3848 ok(
hr ==
D3DRM_OK,
"Failed to create IUnknown from frame1, hr %#lx\n",
hr);
3854 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM2 interface, hr %#lx.\n",
hr);
3858 ok(
hr ==
D3DRM_OK,
"Failed to create IUnknown from frame2, hr %#lx\n",
hr);
3864 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM3 interface, hr %#lx.\n",
hr);
3868 ok(
hr ==
D3DRM_OK,
"Failed to create IUnknown from frame3, hr %#lx\n",
hr);
3886 { &IID_IDirect3DRMDevice2, &
IID_IUnknown, &IID_IDirect3DRMDevice2,
S_OK, },
3887 { &IID_IDirect3DRMDevice3, &
IID_IUnknown, &IID_IDirect3DRMDevice3,
S_OK, },
3888 { &IID_IDirect3DRMWinDevice, &
IID_IUnknown, &IID_IDirect3DRMWinDevice,
S_OK, },
3952 IDirect3DRM *d3drm1;
3953 IDirect3DRM2 *d3drm2;
3954 IDirect3DRM3 *d3drm3;
3955 IDirectDrawClipper *clipper;
3956 IDirect3DRMDevice *device1;
3957 IDirect3DRMDevice2 *device2;
3958 IDirect3DRMDevice3 *device3;
3967 ok(
hr ==
DD_OK,
"Cannot get IDirectDrawClipper interface, hr %#lx\n",
hr);
3968 hr = IDirectDrawClipper_SetHWnd(clipper, 0,
window);
3969 ok(
hr ==
DD_OK,
"Cannot set HWnd to Clipper, hr %#lx\n",
hr);
3975 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice interface, hr %#lx\n",
hr);
3977 ok(
SUCCEEDED(
hr),
"Cannot get IUnknown interface from IDirect3DRMDevice, hr %#lx\n",
hr);
3983 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM2 interface, hr %#lx.\n",
hr);
3985 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice2 interface, hr %#lx\n",
hr);
3987 ok(
SUCCEEDED(
hr),
"Cannot get IUnknown interface from IDirect3DRMDevice2, hr %#lx\n",
hr);
3993 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM3 interface, hr %#lx.\n",
hr);
3995 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice3 interface, hr %#lx\n",
hr);
3997 ok(
SUCCEEDED(
hr),
"Cannot get IUnknown interface from IDirect3DRMDevice3, hr %#lx\n",
hr);
4002 IDirectDrawClipper_Release(clipper);
4012 IDirectDrawSurface **primary =
context;
4019 IDirectDrawSurface_Release(surface);
4027 IDirect3DRM *d3drm1 =
NULL;
4030 IDirect3DRMDevice *device1 = (IDirect3DRMDevice *)0xdeadbeef;
4031 IDirect3DDevice *d3ddevice1 =
NULL;
4032 IDirectDrawClipper *clipper =
NULL, *d3drm_clipper =
NULL;
4033 IDirectDrawSurface *surface =
NULL, *
ds =
NULL, *d3drm_primary =
NULL;
4036 DWORD expected_flags, ret_val;
4040 ULONG ref1, ref2, cref1, cref2;
4046 ok(
hr ==
DD_OK,
"Cannot get IDirectDrawClipper interface, hr %#lx.\n",
hr);
4047 hr = IDirectDrawClipper_SetHWnd(clipper, 0,
window);
4048 ok(
hr ==
DD_OK,
"Cannot set HWnd to Clipper, hr %#lx.\n",
hr);
4051 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
4057 ok(device1 ==
NULL,
"Expected device returned == NULL, got %p.\n", device1);
4067 ok(
hr ==
D3DRM_OK,
"Cannot create IDirect3DRMDevice interface, hr %#lx.\n",
hr);
4069 ok(ref2 > ref1,
"expected ref2 > ref1, got ref1 = %lu , ref2 = %lu.\n", ref1, ref2);
4071 ok(cref2 > cref1,
"expected cref2 > cref1, got cref1 = %lu , cref2 = %lu.\n", cref1, cref2);
4073 ok(ret_val == 300,
"Expected device width = 300, got %lu.\n", ret_val);
4075 ok(ret_val == 200,
"Expected device height == 200, got %lu.\n", ret_val);
4079 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice interface, hr %#lx.\n",
hr);
4082 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
4084 hr = IDirectDrawSurface_GetClipper(surface, &d3drm_clipper);
4088 hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface7, (
void **)&surface7);
4089 ok(
hr ==
DD_OK,
"Cannot get IDirectDrawSurface7 interface, hr %#lx.\n",
hr);
4090 IDirectDrawSurface7_GetDDInterface(surface7, (
void **)&
unknown);
4091 hr = IUnknown_QueryInterface(
unknown, &IID_IDirectDraw, (
void **)&
ddraw);
4092 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
4096 ok(
hr ==
DD_OK,
"Failed to enumerate surfaces, hr %#lx.\n",
hr);
4097 ok(d3drm_primary !=
NULL,
"No primary surface was enumerated.\n");
4098 hr = IDirectDrawSurface_GetClipper(d3drm_primary, &d3drm_clipper);
4099 ok(
hr ==
DD_OK,
"Cannot get attached clipper from primary surface, hr %#lx.\n",
hr);
4100 ok(d3drm_clipper == clipper,
"Expected clipper returned == %p, got %p.\n", clipper , d3drm_clipper);
4102 IDirectDrawClipper_Release(d3drm_clipper);
4103 IDirectDrawSurface_Release(d3drm_primary);
4104 IDirectDrawSurface7_Release(surface7);
4105 IDirectDraw_Release(
ddraw);
4108 surface_desc.dwSize =
sizeof(surface_desc);
4109 hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc);
4110 ok(
hr ==
DD_OK,
"Cannot get surface desc structure, hr %#lx.\n",
hr);
4112 ok((surface_desc.dwWidth == 300) && (surface_desc.dwHeight == 200),
"Expected surface dimensions = 300, 200, got %lu, %lu.\n",
4113 surface_desc.dwWidth, surface_desc.dwHeight);
4115 "Unexpected caps %#lx.\n", surface_desc.ddsCaps.dwCaps);
4117 ok(surface_desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags, surface_desc.dwFlags);
4120 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
4123 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw display mode, hr %#lx\n",
hr);
4124 ok(
desc.ddpfPixelFormat.dwRGBBitCount == surface_desc.ddpfPixelFormat.dwRGBBitCount,
"Expected %lu bpp, got %lu bpp.\n",
4125 surface_desc.ddpfPixelFormat.dwRGBBitCount,
desc.ddpfPixelFormat.dwRGBBitCount);
4127 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &
ds);
4128 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
4131 hr = IDirectDrawSurface_GetSurfaceDesc(
ds, &
desc);
4132 ok(
hr ==
DD_OK,
"Cannot get z surface desc structure, hr %#lx.\n",
hr);
4134 ok((
desc.dwWidth == 300) && (
desc.dwHeight == 200),
"Expected surface dimensions = 300, 200, got %lu, %lu.\n",
4138 ok(
desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags,
desc.dwFlags);
4139 ok(
desc.dwZBufferBitDepth == 16,
"Expected 16 for Z buffer bit depth, got %lu.\n",
desc.dwZBufferBitDepth);
4140 ok(!
desc.ddpfPixelFormat.dwStencilBitMask,
"Unexpected stencil mask %#lx.\n",
desc.ddpfPixelFormat.dwStencilBitMask);
4143 IDirectDrawSurface_Release(
ds);
4145 IDirectDrawSurface_Release(surface);
4151 ok(ref1 == ref2,
"expected ref1 == ref2, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
4153 ok(cref1 == cref2,
"expected cref1 == cref2, got cref1 = %lu, cref2 = %lu.\n", cref1, cref2);
4157 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw display mode, hr %#lx\n",
hr);
4158 hr = IDirectDraw_SetDisplayMode(
ddraw,
desc.dwWidth,
desc.dwHeight, 16);
4159 ok(
hr ==
DD_OK,
"Cannot set display mode to 16bpp, hr %#lx.\n",
hr);
4162 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw display mode, hr %#lx\n",
hr);
4163 ok(
desc.ddpfPixelFormat.dwRGBBitCount == 16,
"Expected 16 bpp, got %lu.\n",
desc.ddpfPixelFormat.dwRGBBitCount);
4166 ok(
hr ==
D3DRM_OK,
"Cannot create IDirect3DRMDevice interface, hr %#lx.\n",
hr);
4169 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice interface, hr %#lx.\n",
hr);
4172 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
4174 surface_desc.dwSize =
sizeof(surface_desc);
4175 hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc);
4176 ok(
hr ==
DD_OK,
"Cannot get surface desc structure, hr %#lx.\n",
hr);
4177 ok(surface_desc.ddpfPixelFormat.dwRGBBitCount == 16,
"Expected 16bpp, got %lubpp.\n",
4178 surface_desc.ddpfPixelFormat.dwRGBBitCount);
4180 hr = IDirectDraw2_RestoreDisplayMode(
ddraw);
4184 IDirectDrawSurface_Release(
ds);
4185 IDirectDrawSurface_Release(surface);
4189 IDirectDrawClipper_Release(clipper);
4190 IDirectDraw_Release(
ddraw);
4197 IDirect3DRM *d3drm1 =
NULL;
4198 IDirect3DRM2 *d3drm2 =
NULL;
4201 IDirect3DRMDevice2 *device2 = (IDirect3DRMDevice2 *)0xdeadbeef;
4202 IDirect3DDevice2 *d3ddevice2 =
NULL;
4203 IDirectDrawClipper *clipper =
NULL, *d3drm_clipper =
NULL;
4204 IDirectDrawSurface *surface =
NULL, *
ds =
NULL, *d3drm_primary =
NULL;
4207 DWORD expected_flags, ret_val;
4211 ULONG ref1, ref2, ref3, cref1, cref2;
4217 ok(
hr ==
DD_OK,
"Cannot get IDirectDrawClipper interface, hr %#lx.\n",
hr);
4218 hr = IDirectDrawClipper_SetHWnd(clipper, 0,
window);
4219 ok(
hr ==
DD_OK,
"Cannot set HWnd to Clipper, hr %#lx.\n",
hr);
4222 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
4227 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM2 interface, hr %#lx.\n",
hr);
4232 ok(device2 ==
NULL,
"Expected device returned == NULL, got %p.\n", device2);
4242 ok(
hr ==
D3DRM_OK,
"Cannot create IDirect3DRMDevice2 interface, hr %#lx.\n",
hr);
4244 ok(ref3 > ref1,
"expected ref3 > ref1, got ref1 = %lu , ref3 = %lu.\n", ref1, ref3);
4246 ok(ref3 == ref2,
"expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
4248 ok(cref2 > cref1,
"expected cref2 > cref1, got cref1 = %lu , cref2 = %lu.\n", cref1, cref2);
4250 ok(ret_val == 300,
"Expected device width = 300, got %lu.\n", ret_val);
4252 ok(ret_val == 200,
"Expected device height == 200, got %lu.\n", ret_val);
4256 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice2 interface, hr %#lx.\n",
hr);
4259 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
4261 hr = IDirectDrawSurface_GetClipper(surface, &d3drm_clipper);
4265 hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface7, (
void **)&surface7);
4266 ok(
hr ==
DD_OK,
"Cannot get IDirectDrawSurface7 interface, hr %#lx.\n",
hr);
4267 IDirectDrawSurface7_GetDDInterface(surface7, (
void **)&
unknown);
4268 hr = IUnknown_QueryInterface(
unknown, &IID_IDirectDraw, (
void **)&
ddraw);
4269 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
4273 ok(
hr ==
DD_OK,
"Failed to enumerate surfaces, hr %#lx.\n",
hr);
4274 ok(d3drm_primary !=
NULL,
"No primary surface was enumerated.\n");
4275 hr = IDirectDrawSurface_GetClipper(d3drm_primary, &d3drm_clipper);
4276 ok(
hr ==
DD_OK,
"Cannot get attached clipper from primary surface, hr %#lx.\n",
hr);
4277 ok(d3drm_clipper == clipper,
"Expected clipper returned == %p, got %p.\n", clipper , d3drm_clipper);
4279 IDirectDrawClipper_Release(d3drm_clipper);
4280 IDirectDrawSurface_Release(d3drm_primary);
4281 IDirectDrawSurface7_Release(surface7);
4282 IDirectDraw_Release(
ddraw);
4285 surface_desc.dwSize =
sizeof(surface_desc);
4286 hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc);
4287 ok(
hr ==
DD_OK,
"Cannot get surface desc structure, hr %#lx.\n",
hr);
4289 ok((surface_desc.dwWidth == 300) && (surface_desc.dwHeight == 200),
"Expected surface dimensions = 300, 200, got %lu, %lu.\n",
4290 surface_desc.dwWidth, surface_desc.dwHeight);
4292 "Unexpected caps %#lx.\n", surface_desc.ddsCaps.dwCaps);
4294 ok(surface_desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags, surface_desc.dwFlags);
4297 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
4300 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw display mode, hr %#lx\n",
hr);
4301 ok(
desc.ddpfPixelFormat.dwRGBBitCount == surface_desc.ddpfPixelFormat.dwRGBBitCount,
"Expected %lu bpp, got %lu bpp.\n",
4302 surface_desc.ddpfPixelFormat.dwRGBBitCount,
desc.ddpfPixelFormat.dwRGBBitCount);
4304 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &
ds);
4305 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
4308 hr = IDirectDrawSurface_GetSurfaceDesc(
ds, &
desc);
4309 ok(
hr ==
DD_OK,
"Cannot get z surface desc structure, hr %#lx.\n",
hr);
4311 ok((
desc.dwWidth == 300) && (
desc.dwHeight == 200),
"Expected surface dimensions = 300, 200, got %lu, %lu.\n",
4315 ok(
desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags,
desc.dwFlags);
4316 ok(
desc.dwZBufferBitDepth == 16,
"Expected 16 for Z buffer bit depth, got %lu.\n",
desc.dwZBufferBitDepth);
4317 ok(!
desc.ddpfPixelFormat.dwStencilBitMask,
"Expected stencil mask %#lx.\n",
desc.ddpfPixelFormat.dwStencilBitMask);
4320 IDirectDrawSurface_Release(
ds);
4322 IDirectDrawSurface_Release(surface);
4328 ok(ref1 == ref3,
"expected ref1 == ref3, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
4330 ok(ref3 == ref2,
"expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
4332 ok(cref1 == cref2,
"expected cref1 == cref2, got cref1 = %lu, cref2 = %lu.\n", cref1, cref2);
4336 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw display mode, hr %#lx\n",
hr);
4337 hr = IDirectDraw_SetDisplayMode(
ddraw,
desc.dwWidth,
desc.dwHeight, 16);
4338 ok(
hr ==
DD_OK,
"Cannot set display mode to 16bpp, hr %#lx.\n",
hr);
4341 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw display mode, hr %#lx\n",
hr);
4342 ok(
desc.ddpfPixelFormat.dwRGBBitCount == 16,
"Expected 16 bpp, got %lu.\n",
desc.ddpfPixelFormat.dwRGBBitCount);
4345 ok(
hr ==
D3DRM_OK,
"Cannot create IDirect3DRMDevice2 interface, hr %#lx.\n",
hr);
4348 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice2 interface, hr %#lx.\n",
hr);
4351 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
4353 surface_desc.dwSize =
sizeof(surface_desc);
4354 hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc);
4355 ok(
hr ==
DD_OK,
"Cannot get surface desc structure, hr %#lx.\n",
hr);
4356 ok(surface_desc.ddpfPixelFormat.dwRGBBitCount == 16,
"Expected 16bpp, got %lubpp.\n",
4357 surface_desc.ddpfPixelFormat.dwRGBBitCount);
4359 hr = IDirectDraw2_RestoreDisplayMode(
ddraw);
4362 IDirectDrawSurface_Release(surface);
4367 IDirectDrawClipper_Release(clipper);
4368 IDirectDraw_Release(
ddraw);
4375 IDirect3DRM *d3drm1 =
NULL;
4376 IDirect3DRM3 *d3drm3 =
NULL;
4379 IDirect3DRMDevice3 *device3 = (IDirect3DRMDevice3 *)0xdeadbeef;
4380 IDirect3DDevice2 *d3ddevice2 =
NULL;
4381 IDirect3DDevice3 *d3ddevice3 =
NULL;
4382 IDirectDrawClipper *clipper =
NULL, *d3drm_clipper =
NULL;
4383 IDirectDrawSurface *surface =
NULL, *
ds =
NULL, *d3drm_primary =
NULL;
4386 DWORD expected_flags, ret_val;
4390 ULONG ref1, ref2, ref3, cref1, cref2;
4396 ok(
hr ==
DD_OK,
"Cannot get IDirectDrawClipper interface, hr %#lx.\n",
hr);
4397 hr = IDirectDrawClipper_SetHWnd(clipper, 0,
window);
4398 ok(
hr ==
DD_OK,
"Cannot set HWnd to Clipper, hr %#lx.\n",
hr);
4401 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
4406 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM3 interface, hr %#lx.\n",
hr);
4411 ok(device3 ==
NULL,
"Expected device returned == NULL, got %p.\n", device3);
4421 ok(
hr ==
D3DRM_OK,
"Cannot create IDirect3DRMDevice3 interface, hr %#lx.\n",
hr);
4423 ok(ref3 > ref1,
"expected ref3 > ref1, got ref1 = %lu , ref3 = %lu.\n", ref1, ref3);
4425 ok(ref3 == ref2,
"expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
4427 ok(cref2 > cref1,
"expected cref2 > cref1, got cref1 = %lu , cref2 = %lu.\n", cref1, cref2);
4429 ok(ret_val == 300,
"Expected device width = 300, got %lu.\n", ret_val);
4431 ok(ret_val == 200,
"Expected device height == 200, got %lu.\n", ret_val);
4435 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice2 interface, hr %#lx.\n",
hr);
4442 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
4444 hr = IDirectDrawSurface_GetClipper(surface, &d3drm_clipper);
4448 hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface7, (
void **)&surface7);
4449 ok(
hr ==
DD_OK,
"Cannot get IDirectDrawSurface7 interface, hr %#lx.\n",
hr);
4450 IDirectDrawSurface7_GetDDInterface(surface7, (
void **)&
unknown);
4451 hr = IUnknown_QueryInterface(
unknown, &IID_IDirectDraw, (
void **)&
ddraw);
4452 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
4456 ok(
hr ==
DD_OK,
"Failed to enumerate surfaces, hr %#lx.\n",
hr);
4457 ok(d3drm_primary !=
NULL,
"No primary surface was enumerated.\n");
4458 hr = IDirectDrawSurface_GetClipper(d3drm_primary, &d3drm_clipper);
4459 ok(
hr ==
DD_OK,
"Cannot get attached clipper from primary surface, hr %#lx.\n",
hr);
4460 ok(d3drm_clipper == clipper,
"Expected clipper returned == %p, got %p.\n", clipper , d3drm_clipper);
4462 IDirectDrawClipper_Release(d3drm_clipper);
4463 IDirectDrawSurface_Release(d3drm_primary);
4464 IDirectDrawSurface7_Release(surface7);
4465 IDirectDraw_Release(
ddraw);
4468 surface_desc.dwSize =
sizeof(surface_desc);
4469 hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc);
4470 ok(
hr ==
DD_OK,
"Cannot get surface desc structure, hr %#lx.\n",
hr);
4472 ok((surface_desc.dwWidth == 300) && (surface_desc.dwHeight == 200),
"Expected surface dimensions = 300, 200, got %lu, %lu.\n",
4473 surface_desc.dwWidth, surface_desc.dwHeight);
4475 "Unexpected caps %#lx.\n", surface_desc.ddsCaps.dwCaps);
4477 ok(surface_desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags, surface_desc.dwFlags);
4480 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
4483 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw display mode, hr %#lx\n",
hr);
4484 ok(
desc.ddpfPixelFormat.dwRGBBitCount == surface_desc.ddpfPixelFormat.dwRGBBitCount,
"Expected %lu bpp, got %lu bpp.\n",
4485 surface_desc.ddpfPixelFormat.dwRGBBitCount,
desc.ddpfPixelFormat.dwRGBBitCount);
4487 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &
ds);
4488 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
4491 hr = IDirectDrawSurface_GetSurfaceDesc(
ds, &
desc);
4492 ok(
hr ==
DD_OK,
"Cannot get z surface desc structure, hr %#lx.\n",
hr);
4494 ok((
desc.dwWidth == 300) && (
desc.dwHeight == 200),
"Expected surface dimensions = 300, 200, got %lu, %lu.\n",
4498 ok(
desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags,
desc.dwFlags);
4499 ok(
desc.dwZBufferBitDepth == 16,
"Expected 16 for Z buffer bit depth, got %lu.\n",
desc.dwZBufferBitDepth);
4500 ok(!
desc.ddpfPixelFormat.dwStencilBitMask,
"Unexpected stencil mask %#lx.\n",
desc.ddpfPixelFormat.dwStencilBitMask);
4503 IDirectDrawSurface_Release(
ds);
4505 IDirectDrawSurface_Release(surface);
4511 ok(ref1 == ref3,
"expected ref1 == ref3, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
4513 ok(ref3 == ref2,
"expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
4515 ok(cref1 == cref2,
"expected cref1 == cref2, got cref1 = %lu, cref2 = %lu.\n", cref1, cref2);
4519 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw display mode, hr %#lx\n",
hr);
4520 hr = IDirectDraw_SetDisplayMode(
ddraw,
desc.dwWidth,
desc.dwHeight, 16);
4521 ok(
hr ==
DD_OK,
"Cannot set display mode to 16bpp, hr %#lx.\n",
hr);
4524 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw display mode, hr %#lx\n",
hr);
4525 ok(
desc.ddpfPixelFormat.dwRGBBitCount == 16,
"Expected 16 bpp, got %lu.\n",
desc.ddpfPixelFormat.dwRGBBitCount);
4528 ok(
hr ==
D3DRM_OK,
"Cannot create IDirect3DRMDevice3 interface, hr %#lx.\n",
hr);
4531 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice2 interface, hr %#lx.\n",
hr);
4534 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
4536 surface_desc.dwSize =
sizeof(surface_desc);
4537 hr = IDirectDrawSurface_GetSurfaceDesc(surface, &surface_desc);
4538 ok(
hr ==
DD_OK,
"Cannot get surface desc structure, hr %#lx.\n",
hr);
4539 ok(surface_desc.ddpfPixelFormat.dwRGBBitCount == 16,
"Expected 16bpp, got %lubpp.\n",
4540 surface_desc.ddpfPixelFormat.dwRGBBitCount);
4542 hr = IDirectDraw2_RestoreDisplayMode(
ddraw);
4545 IDirectDrawSurface_Release(surface);
4550 IDirectDrawClipper_Release(clipper);
4551 IDirectDraw_Release(
ddraw);
4560 IDirect3DRM *d3drm1 =
NULL;
4561 IDirect3DRMDevice *device1 = (IDirect3DRMDevice *)0xdeadbeef;
4562 IDirect3DDevice *d3ddevice1 =
NULL;
4563 IDirectDrawSurface *surface =
NULL, *
ds =
NULL, *d3drm_surface =
NULL, *d3drm_ds =
NULL;
4564 DWORD expected_flags, ret_val;
4567 ULONG ref1, ref2, surface_ref1, surface_ref2;
4573 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
4582 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
4598 ok(device1 ==
NULL,
"Expected device returned == NULL, got %p.\n", device1);
4599 IDirectDrawSurface_Release(surface);
4614 ok(
SUCCEEDED(
hr),
"Cannot create IDirect3DRMDevice interface, hr %#lx.\n",
hr);
4616 ok(ref2 > ref1,
"expected ref2 > ref1, got ref1 = %lu , ref2 = %lu.\n", ref1, ref2);
4618 ok(surface_ref2 > surface_ref1,
"Expected surface_ref2 > surface_ref1, got surface_ref1 = %lu, surface_ref2 = %lu.\n", surface_ref1, surface_ref2);
4620 ok(ret_val == rc.
right,
"Expected device width = 300, got %lu.\n", ret_val);
4622 ok(ret_val == rc.
bottom,
"Expected device height == 200, got %lu.\n", ret_val);
4627 ok(
hr ==
DD_OK,
"Failed to enumerate surfaces, hr %#lx.\n",
hr);
4628 ok(d3drm_surface ==
NULL,
"No primary surface should have enumerated (%p).\n", d3drm_surface);
4631 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice interface, hr %#lx.\n",
hr);
4634 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
4635 ok(surface == d3drm_surface,
"Expected surface returned == %p, got %p.\n", surface, d3drm_surface);
4638 hr = IDirectDrawSurface_GetAttachedSurface(d3drm_surface, &caps, &
ds);
4639 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
4643 hr = IDirectDrawSurface_GetSurfaceDesc(
ds, &
desc);
4644 ok(
hr ==
DD_OK,
"Cannot get z surface desc structure, hr %#lx.\n",
hr);
4647 ok((
desc.dwWidth == rc.
right) && (
desc.dwHeight == rc.
bottom),
"Expected surface dimensions = %lu, %lu, got %lu, %lu.\n",
4651 ok(
desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags,
desc.dwFlags);
4653 IDirectDrawSurface_Release(
ds);
4655 IDirectDrawSurface_Release(d3drm_surface);
4659 ok(ref1 == ref2,
"expected ref1 == ref2, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
4661 ok(surface_ref2 == surface_ref1,
"Expected surface_ref2 == surface_ref1, got surface_ref1 = %lu, surface_ref2 = %lu.\n",
4662 surface_ref1, surface_ref2);
4663 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &
ds);
4664 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
4666 ref1 = IDirectDrawSurface_Release(
ds);
4667 ok(ref1 == 1,
"Unexpected refcount %lu.\n", ref1);
4668 ref1 = IDirectDrawSurface_Release(surface);
4669 ok(!ref1,
"Unexpected refcount %lu.\n", ref1);
4685 desc.dwZBufferBitDepth = 16;
4689 ok(
hr ==
DD_OK,
"Cannot create depth surface, hr %#lx.\n",
hr);
4690 hr = IDirectDrawSurface_AddAttachedSurface(surface,
ds);
4694 ok(
SUCCEEDED(
hr),
"Cannot create IDirect3DRMDevice interface, hr %#lx.\n",
hr);
4697 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice interface, hr %#lx.\n",
hr);
4700 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
4701 ok(surface == d3drm_surface,
"Expected surface returned == %p, got %p.\n", surface, d3drm_surface);
4704 hr = IDirectDrawSurface_GetAttachedSurface(d3drm_surface, &caps, &d3drm_ds);
4705 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
4706 ok(
ds == d3drm_ds,
"Expected depth surface (%p) == surface created internally (%p).\n",
ds, d3drm_ds);
4708 IDirectDrawSurface_Release(d3drm_ds);
4709 IDirectDrawSurface_Release(d3drm_surface);
4710 IDirectDrawSurface_Release(
ds);
4714 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &
ds);
4715 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
4717 ref1 = IDirectDrawSurface_Release(
ds);
4718 ok(ref1 == 1,
"Unexpected refcount %lu.\n", ref1);
4719 ref1 = IDirectDrawSurface_Release(surface);
4720 ok(!ref1,
"Unexpected refcount %lu.\n", ref1);
4722 IDirectDraw_Release(
ddraw);
4731 IDirect3DRM *d3drm1 =
NULL;
4732 IDirect3DRM2 *d3drm2 =
NULL;
4733 IDirect3DRMDevice2 *device2 = (IDirect3DRMDevice2 *)0xdeadbeef;
4734 IDirect3DDevice2 *d3ddevice2 =
NULL;
4735 IDirectDrawSurface *surface =
NULL, *
ds =
NULL, *d3drm_surface =
NULL, *d3drm_ds =
NULL;
4736 DWORD expected_flags, ret_val;
4739 ULONG ref1, ref2, ref3, surface_ref1, surface_ref2;
4745 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
4754 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
4758 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM2 interface, hr %#lx.\n",
hr);
4774 ok(device2 ==
NULL,
"Expected device returned == NULL, got %p.\n", device2);
4775 IDirectDrawSurface_Release(surface);
4790 ok(
SUCCEEDED(
hr),
"Cannot create IDirect3DRMDevice2 interface, hr %#lx.\n",
hr);
4792 ok(ref3 > ref1,
"expected ref3 > ref1, got ref1 = %lu , ref3 = %lu.\n", ref1, ref3);
4794 ok(ref3 == ref2,
"expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
4796 ok(surface_ref2 > surface_ref1,
"Expected surface_ref2 > surface_ref1, got surface_ref1 = %lu, surface_ref2 = %lu.\n", surface_ref1, surface_ref2);
4798 ok(ret_val == rc.
right,
"Expected device width = 300, got %lu.\n", ret_val);
4800 ok(ret_val == rc.
bottom,
"Expected device height == 200, got %lu.\n", ret_val);
4805 ok(
hr ==
DD_OK,
"Failed to enumerate surfaces, hr %#lx.\n",
hr);
4806 ok(d3drm_surface ==
NULL,
"No primary surface should have enumerated (%p).\n", d3drm_surface);
4809 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice2 interface, hr %#lx.\n",
hr);
4812 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
4813 ok(surface == d3drm_surface,
"Expected surface returned == %p, got %p.\n", surface, d3drm_surface);
4816 hr = IDirectDrawSurface_GetAttachedSurface(d3drm_surface, &caps, &
ds);
4817 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
4821 hr = IDirectDrawSurface_GetSurfaceDesc(
ds, &
desc);
4822 ok(
hr ==
DD_OK,
"Cannot get z surface desc structure, hr %#lx.\n",
hr);
4825 ok((
desc.dwWidth == rc.
right) && (
desc.dwHeight == rc.
bottom),
"Expected surface dimensions = %lu, %lu, got %lu, %lu.\n",
4829 ok(
desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags,
desc.dwFlags);
4831 IDirectDrawSurface_Release(
ds);
4833 IDirectDrawSurface_Release(d3drm_surface);
4837 ok(ref1 == ref3,
"expected ref1 == ref3, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
4839 ok(ref3 == ref2,
"expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
4841 ok(surface_ref2 == surface_ref1,
"Expected surface_ref2 == surface_ref1, got surface_ref1 = %lu, surface_ref2 = %lu.\n",
4842 surface_ref1, surface_ref2);
4843 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &
ds);
4844 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
4846 ref1 = IDirectDrawSurface_Release(
ds);
4847 ok(ref1 == 1,
"Unexpected refcount %lu.\n", ref1);
4849 ref1 = IDirectDrawSurface_Release(surface);
4850 ok(!ref1,
"Unexpected refcount %lu.\n", ref1);
4866 desc.dwZBufferBitDepth = 16;
4870 ok(
hr ==
DD_OK,
"Cannot create depth surface, hr %#lx.\n",
hr);
4871 hr = IDirectDrawSurface_AddAttachedSurface(surface,
ds);
4875 ok(
SUCCEEDED(
hr),
"Cannot create IDirect3DRMDevice2 interface, hr %#lx.\n",
hr);
4878 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice2 interface, hr %#lx.\n",
hr);
4881 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
4882 ok(surface == d3drm_surface,
"Expected surface returned == %p, got %p.\n", surface, d3drm_surface);
4885 hr = IDirectDrawSurface_GetAttachedSurface(d3drm_surface, &caps, &d3drm_ds);
4886 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
4887 ok(
ds == d3drm_ds,
"Expected depth surface (%p) == surface created internally (%p).\n",
ds, d3drm_ds);
4889 IDirectDrawSurface_Release(d3drm_ds);
4890 IDirectDrawSurface_Release(d3drm_surface);
4891 IDirectDrawSurface_Release(
ds);
4895 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &
ds);
4896 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
4898 ref1 = IDirectDrawSurface_Release(
ds);
4899 ok(ref1 == 1,
"Unexpected refcount %lu.\n", ref1);
4900 ref1 = IDirectDrawSurface_Release(surface);
4901 ok(!ref1,
"Unexpected refcount %lu.\n", ref1);
4904 IDirectDraw_Release(
ddraw);
4913 IDirect3DRM *d3drm1 =
NULL;
4914 IDirect3DRM3 *d3drm3 =
NULL;
4915 IDirect3DRMDevice3 *device3 = (IDirect3DRMDevice3 *)0xdeadbeef;
4916 IDirect3DDevice2 *d3ddevice2 =
NULL;
4917 IDirectDrawSurface *surface =
NULL, *
ds =
NULL, *d3drm_surface =
NULL, *d3drm_ds =
NULL;
4918 DWORD expected_flags, ret_val;
4921 ULONG ref1, ref2, ref3, surface_ref1, surface_ref2;
4927 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
4936 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
4940 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM3 interface, hr %#lx.\n",
hr);
4956 ok(device3 ==
NULL,
"Expected device returned == NULL, got %p.\n", device3);
4957 IDirectDrawSurface_Release(surface);
4972 ok(
SUCCEEDED(
hr),
"Cannot create IDirect3DRMDevice3 interface, hr %#lx.\n",
hr);
4974 ok(ref3 > ref1,
"expected ref3 > ref1, got ref1 = %lu , ref3 = %lu.\n", ref1, ref3);
4976 ok(ref3 == ref2,
"expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
4978 ok(surface_ref2 > surface_ref1,
"Expected surface_ref2 > surface_ref1, got surface_ref1 = %lu, surface_ref2 = %lu.\n", surface_ref1, surface_ref2);
4980 ok(ret_val == rc.
right,
"Expected device width = 300, got %lu.\n", ret_val);
4982 ok(ret_val == rc.
bottom,
"Expected device height == 200, got %lu.\n", ret_val);
4987 ok(
hr ==
DD_OK,
"Failed to enumerate surfaces, hr %#lx.\n",
hr);
4988 ok(d3drm_surface ==
NULL,
"No primary surface should have enumerated (%p).\n", d3drm_surface);
4991 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice2 interface, hr %#lx.\n",
hr);
4994 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
4995 ok(surface == d3drm_surface,
"Expected surface returned == %p, got %p.\n", surface, d3drm_surface);
4998 hr = IDirectDrawSurface_GetAttachedSurface(d3drm_surface, &caps, &
ds);
4999 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
5003 hr = IDirectDrawSurface_GetSurfaceDesc(
ds, &
desc);
5004 ok(
hr ==
DD_OK,
"Cannot get z surface desc structure, hr %#lx.\n",
hr);
5007 ok((
desc.dwWidth == rc.
right) && (
desc.dwHeight == rc.
bottom),
"Expected surface dimensions = %lu, %lu, got %lu, %lu.\n",
5011 ok(
desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags,
desc.dwFlags);
5013 IDirectDrawSurface_Release(
ds);
5015 IDirectDrawSurface_Release(d3drm_surface);
5019 ok(ref1 == ref3,
"expected ref1 == ref3, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
5021 ok(ref3 == ref2,
"expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
5023 ok(surface_ref2 == surface_ref1,
"Expected surface_ref2 == surface_ref1, got surface_ref1 = %lu, surface_ref2 = %lu.\n",
5024 surface_ref1, surface_ref2);
5026 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &
ds);
5029 IDirectDrawSurface_Release(
ds);
5030 ref1 = IDirectDrawSurface_Release(surface);
5031 ok(!ref1,
"Unexpected refcount %lu.\n", ref1);
5047 desc.dwZBufferBitDepth = 16;
5051 ok(
hr ==
DD_OK,
"Cannot create depth surface, hr %#lx.\n",
hr);
5052 hr = IDirectDrawSurface_AddAttachedSurface(surface,
ds);
5056 ok(
SUCCEEDED(
hr),
"Cannot create IDirect3DRMDevice3 interface, hr %#lx.\n",
hr);
5059 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice2 interface, hr %#lx.\n",
hr);
5062 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
5063 ok(surface == d3drm_surface,
"Expected surface returned == %p, got %p.\n", surface, d3drm_surface);
5066 hr = IDirectDrawSurface_GetAttachedSurface(d3drm_surface, &caps, &d3drm_ds);
5067 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
5068 ok(
ds == d3drm_ds,
"Expected depth surface (%p) == surface created internally (%p).\n",
ds, d3drm_ds);
5070 IDirectDrawSurface_Release(d3drm_ds);
5071 IDirectDrawSurface_Release(d3drm_surface);
5072 IDirectDrawSurface_Release(
ds);
5075 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &
ds);
5076 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
5078 ref1 = IDirectDrawSurface_Release(
ds);
5079 ok(ref1 == 1,
"Unexpected refcount %lu.\n", ref1);
5083 ok(
SUCCEEDED(
hr),
"Cannot create IDirect3DRMDevice3 interface, hr %#lx.\n",
hr);
5086 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice2 interface, hr %#lx.\n",
hr);
5089 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
5090 ok(surface == d3drm_surface,
"Expected surface returned == %p, got %p.\n", surface, d3drm_surface);
5093 hr = IDirectDrawSurface_GetAttachedSurface(d3drm_surface, &caps, &d3drm_ds);
5094 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
5095 ok(
ds == d3drm_ds,
"Expected depth surface (%p) == surface created internally (%p).\n",
ds, d3drm_ds);
5097 IDirectDrawSurface_Release(d3drm_ds);
5098 IDirectDrawSurface_Release(d3drm_surface);
5101 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &
ds);
5102 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
5104 ref1 = IDirectDrawSurface_Release(
ds);
5105 ok(ref1 == 1,
"Unexpected refcount %lu.\n", ref1);
5106 ref1 = IDirectDrawSurface_Release(surface);
5107 ok(!ref1,
"Unexpected refcount %lu.\n", ref1);
5121 ok(
SUCCEEDED(
hr),
"Cannot create IDirect3DRMDevice3 interface, hr %#lx.\n",
hr);
5124 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice2 interface, hr %#lx.\n",
hr);
5127 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
5128 ok(surface == d3drm_surface,
"Expected surface returned == %p, got %p.\n", surface, d3drm_surface);
5131 hr = IDirectDrawSurface_GetAttachedSurface(d3drm_surface, &caps, &d3drm_ds);
5133 IDirectDrawSurface_Release(d3drm_surface);
5137 ref1 = IDirectDrawSurface_Release(surface);
5138 ok(!ref1,
"Unexpected refcount %lu.\n", ref1);
5141 IDirectDraw_Release(
ddraw);
5147 static const DWORD z_depths[] = { 32, 24, 16 };
5148 IDirectDrawSurface *surface;
5159 memset(&surface_desc, 0,
sizeof(surface_desc));
5160 surface_desc.dwSize =
sizeof(surface_desc);
5163 surface_desc.dwWidth = rc.
right;
5164 surface_desc.dwHeight = rc.
bottom;
5166 hr = IDirectDraw_CreateSurface(
ddraw, &surface_desc, &surface,
NULL);
5174 memset(&surface_desc, 0,
sizeof(surface_desc));
5175 surface_desc.dwSize =
sizeof(surface_desc);
5178 surface_desc.dwZBufferBitDepth = z_depths[
i];
5179 surface_desc.dwWidth = rc.
right;
5180 surface_desc.dwHeight = rc.
bottom;
5184 hr = IDirectDrawSurface_AddAttachedSurface(surface, *
ds);
5188 IDirectDrawSurface_Release(*
ds);
5192 if (
SUCCEEDED(IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DHALDevice, (
void **)&
device)))
5195 IDirectDrawSurface_DeleteAttachedSurface(surface, 0, *
ds);
5196 IDirectDrawSurface_Release(*
ds);
5200 IDirectDrawSurface_Release(surface);
5206 IDirectDraw *ddraw1 =
NULL, *temp_ddraw1;
5207 IDirect3D *d3d1 =
NULL, *temp_d3d1;
5208 IDirect3DRM *d3drm1 =
NULL;
5209 IDirect3DRMDevice *device1 = (IDirect3DRMDevice *)0xdeadbeef;
5210 IDirect3DRMDevice2 *device2;
5211 IDirect3DRMDevice3 *device3;
5212 IDirect3DDevice *d3ddevice1 =
NULL, *d3drm_d3ddevice1 =
NULL, *temp_d3ddevice1;
5213 IDirect3DDevice2 *d3ddevice2 = (IDirect3DDevice2 *)0xdeadbeef;
5214 IDirectDrawSurface *surface =
NULL, *
ds =
NULL, *d3drm_ds =
NULL;
5215 DWORD expected_flags, ret_val;
5220 ULONG ref1, ref2, ref3, ref4, device_ref1, device_ref2, d3d_ref1, d3d_ref2;
5224 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
5229 hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirect3D, (
void **)&d3d1);
5230 ok(
hr ==
DD_OK,
"Cannot get IDirect3D2 interface, hr %#lx.\n",
hr);
5235 if (d3ddevice1 ==
NULL)
5237 win_skip(
"Cannot create IM device, skipping tests.\n");
5239 IDirectDraw_Release(ddraw1);
5245 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
5250 ok(device1 ==
NULL,
"Expected device returned == NULL, got %p.\n", device1);
5257 ok(
hr ==
DD_OK,
"Failed to create IDirect3DRMDevice interface, hr %#lx\n",
hr);
5259 ok(ref2 > ref1,
"expected ref2 > ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
5261 ok(device_ref2 > device_ref1,
"Expected device_ref2 > device_ref1, got device_ref1 = %lu, device_ref2 = %lu.\n", device_ref1, device_ref2);
5263 ok(d3d_ref2 > d3d_ref1,
"Expected d3d_ref2 > d3d_ref1, got d3d_ref1 = %lu, d3d_ref2 = %lu.\n", d3d_ref1, d3d_ref2);
5265 ok(ret_val == rc.
right,
"Expected device width = 300, got %lu.\n", ret_val);
5267 ok(ret_val == rc.
bottom,
"Expected device height == 200, got %lu.\n", ret_val);
5270 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice2 Interface, hr %#lx.\n",
hr);
5273 ok(d3ddevice2 ==
NULL,
"Expected d3ddevice2 == NULL, got %p.\n", d3ddevice2);
5276 d3ddevice2 = (IDirect3DDevice2 *)0xdeadbeef;
5278 ok(
hr ==
DD_OK,
"Cannot get IDirect3DRMDevice3 Interface, hr %#lx.\n",
hr);
5281 ok(d3ddevice2 ==
NULL,
"Expected d3ddevice2 == NULL, got %p.\n", d3ddevice2);
5286 ok(
hr ==
DD_OK,
"Failed to enumerate surfaces, hr %#lx.\n",
hr);
5287 ok(surface ==
NULL,
"No primary surface should have enumerated (%p).\n", surface);
5290 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice interface, hr %#lx.\n",
hr);
5291 ok(d3ddevice1 == d3drm_d3ddevice1,
"Expected Immediate Mode device created == %p, got %p.\n", d3ddevice1, d3drm_d3ddevice1);
5295 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
5299 hr = IDirectDrawSurface_GetSurfaceDesc(surface, &
desc);
5300 ok(
hr ==
DD_OK,
"Cannot get surface desc structure, hr %#lx.\n",
hr);
5302 ok((
desc.dwWidth == rc.
right) && (
desc.dwHeight == rc.
bottom),
"Expected surface dimensions = %lu, %lu, got %lu, %lu.\n",
5305 "Unexpected caps %lx.\n",
desc.ddsCaps.dwCaps);
5307 ok(
desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags,
desc.dwFlags);
5309 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &d3drm_ds);
5310 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
5311 ok(
ds == d3drm_ds,
"Expected depth surface (%p) == surface created internally (%p).\n",
ds, d3drm_ds);
5314 hr = IDirectDrawSurface_GetSurfaceDesc(
ds, &
desc);
5315 ok(
hr ==
DD_OK,
"Cannot get z surface desc structure, hr %#lx.\n",
hr);
5317 ok((
desc.dwWidth == rc.
right) && (
desc.dwHeight == rc.
bottom),
"Expected surface dimensions = %lu, %lu, got %lu, %lu.\n",
5321 ok(
desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags,
desc.dwFlags);
5323 IDirectDrawSurface_Release(d3drm_ds);
5324 IDirectDrawSurface_Release(
ds);
5325 IDirectDrawSurface_Release(surface);
5329 ok(ref1 == ref2,
"expected ref1 == ref2, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
5331 ok(device_ref2 == device_ref1,
"Expected device_ref2 == device_ref1, got device_ref1 = %lu, device_ref2 = %lu.\n", device_ref1, device_ref2);
5335 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice interface, hr %#lx.\n",
hr);
5343 ok(
SUCCEEDED(
hr),
"Failed to initialise IDirect3DRMDevice interface, hr %#lx\n",
hr);
5345 ok(ref2 > ref1,
"expected ref2 > ref1, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
5347 ok(device_ref2 > device_ref1,
"Expected device_ref2 > device_ref1, got device_ref1 = %lu, device_ref2 = %lu.\n",
5348 device_ref1, device_ref2);
5350 ok(d3d_ref2 > d3d_ref1,
"Expected d3d_ref2 > d3d_ref1, got d3d_ref1 = %lu, d3d_ref2 = %lu.\n", d3d_ref1, d3d_ref2);
5352 ok(ret_val == rc.
right,
"Expected device width = 300, got %lu.\n", ret_val);
5354 ok(ret_val == rc.
bottom,
"Expected device height == 200, got %lu.\n", ret_val);
5359 ok(ref3 > ref1,
"expected ref3 > ref1, got ref1 = %lu , ref3 = %lu.\n", ref1, ref3);
5361 ok(ref3 > device_ref2,
"Expected ref3 > device_ref2, got ref3 = %lu, device_ref2 = %lu.\n", ref3, device_ref2);
5363 ok(ref3 > d3d_ref2,
"Expected ref3 > d3d_ref2, got ref3 = %lu, d3d_ref2 = %lu.\n", ref3, d3d_ref2);
5370 ok(
SUCCEEDED(
hr),
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
5373 hr = IDirectDraw_QueryInterface(temp_ddraw1, &IID_IDirect3D, (
void **)&temp_d3d1);
5379 ok(ref3 > ref2,
"expected ref3 > ref1, got ref1 = %lu , ref3 = %lu.\n", ref1, ref3);
5381 ok(ref3 == device_ref2,
"Expected ref3 == device_ref2, got ref3 = %lu, device_ref2 = %lu.\n", ref3, device_ref2);
5383 todo_wine ok(ref3 < d3d_ref2,
"Expected ref3 < d3d_ref2, got ref3 = %lu, d3d_ref2 = %lu.\n", ref3, d3d_ref2);
5388 IDirectDrawSurface_Release(surface);
5389 IDirectDraw_Release(temp_ddraw1);
5391 d3ddevice2 = (IDirect3DDevice2 *)0xdeadbeef;
5393 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice2 Interface, hr %#lx.\n",
hr);
5396 ok(d3ddevice2 ==
NULL,
"Expected d3ddevice2 == NULL, got %p.\n", d3ddevice2);
5399 d3ddevice2 = (IDirect3DDevice2 *)0xdeadbeef;
5401 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice3 Interface, hr %#lx.\n",
hr);
5404 ok(d3ddevice2 ==
NULL,
"Expected d3ddevice2 == NULL, got %p.\n", d3ddevice2);
5411 ok(surface ==
NULL,
"No primary surface should have enumerated (%p).\n", surface);
5414 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DDevice interface, hr %#lx.\n",
hr);
5415 ok(d3ddevice1 == d3drm_d3ddevice1,
"Expected Immediate Mode device created == %p, got %p.\n",
5416 d3ddevice1, d3drm_d3ddevice1);
5420 ok(
SUCCEEDED(
hr),
"Cannot get surface to the render target, hr %#lx.\n",
hr);
5424 hr = IDirectDrawSurface_GetSurfaceDesc(surface, &
desc);
5425 ok(
SUCCEEDED(
hr),
"Cannot get surface desc structure, hr %#lx.\n",
hr);
5427 ok((
desc.dwWidth == rc.
right) && (
desc.dwHeight == rc.
bottom),
"Expected surface dimensions = %lu, %lu, got %lu, %lu.\n",
5430 "Unexpected caps got %lx.\n",
desc.ddsCaps.dwCaps);
5432 ok(
desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags,
desc.dwFlags);
5434 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &d3drm_ds);
5435 ok(
SUCCEEDED(
hr),
"Cannot get attached depth surface, hr %#lx.\n",
hr);
5436 ok(
ds == d3drm_ds,
"Expected depth surface (%p) == surface created internally (%p).\n",
ds, d3drm_ds);
5439 hr = IDirectDrawSurface_GetSurfaceDesc(
ds, &
desc);
5440 ok(
SUCCEEDED(
hr),
"Cannot get z surface desc structure, hr %#lx.\n",
hr);
5442 ok((
desc.dwWidth == rc.
right) && (
desc.dwHeight == rc.
bottom),
"Expected surface dimensions = %lu, %lu, got %lu, %lu.\n",
5446 ok(
desc.dwFlags == expected_flags,
"Expected %#lx for flags, got %#lx.\n", expected_flags,
desc.dwFlags);
5448 IDirectDrawSurface_Release(d3drm_ds);
5449 IDirectDrawSurface_Release(
ds);
5450 IDirectDrawSurface_Release(surface);
5454 ok(ref1 == ref2,
"expected ref1 == ref2, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
5456 ok(device_ref2 == device_ref1,
"Expected device_ref2 == device_ref1, got device_ref1 = %lu, device_ref2 = %lu.\n",
5457 device_ref1, device_ref2);
5459 todo_wine ok(d3d_ref2 > d3d_ref1,
"Expected d3d_ref2 > d3d_ref1, got d3d_ref1 = %lu, d3d_ref2 = %lu.\n", d3d_ref1,
5465 IDirectDraw_Release(ddraw1);
5471 static const DWORD z_depths[] = { 32, 24, 16 };
5472 IDirectDrawSurface *surface;
5484 memset(&surface_desc, 0,
sizeof(surface_desc));
5485 surface_desc.dwSize =
sizeof(surface_desc);
5488 surface_desc.dwWidth = rc.
right;
5489 surface_desc.dwHeight = rc.
bottom;
5491 hr = IDirectDraw2_CreateSurface(
ddraw, &surface_desc, &surface,
NULL);
5494 hr = IDirectDraw2_QueryInterface(
ddraw, &IID_IDirect3D2, (
void **)&d3d);
5497 IDirectDrawSurface_Release(surface);
5507 memset(&surface_desc, 0,
sizeof(surface_desc));
5508 surface_desc.dwSize =
sizeof(surface_desc);
5511 surface_desc.dwZBufferBitDepth = z_depths[
i];
5512 surface_desc.dwWidth = rc.
right;
5513 surface_desc.dwHeight = rc.
bottom;
5517 hr = IDirectDrawSurface_AddAttachedSurface(surface, *
ds);
5521 IDirectDrawSurface_Release(*
ds);
5528 IDirectDrawSurface_DeleteAttachedSurface(surface, 0, *
ds);
5529 IDirectDrawSurface_Release(*
ds);
5534 IDirectDrawSurface_Release(surface);
5540 IDirectDraw *ddraw1 =
NULL, *temp_ddraw1;
5541 IDirectDraw2 *ddraw2 =
NULL, *temp_ddraw2;
5543 IDirect3D2 *d3d2 =
NULL, *temp_d3d2;
5544 IDirect3DRM *d3drm1 =
NULL;
5545 IDirect3DRM2 *d3drm2 =
NULL;
5546 IDirect3DRMDevice *device1;
5547 IDirect3DRMDevice2 *device2 = (IDirect3DRMDevice2 *)0xdeadbeef;
5548 IDirect3DDevice *d3ddevice1;
5549 IDirect3DDevice2 *d3ddevice2 =
NULL, *d3drm_d3ddevice2 =
NULL, *temp_d3ddevice2;
5550 IDirectDrawSurface *surface =
NULL, *
ds =
NULL, *d3drm_ds =
NULL;
5551 DWORD expected_flags, ret_val;
5556 ULONG ref1, ref2, ref3, ref4, ref5, device_ref1, device_ref2, d3d_ref1, d3d_ref2;
5560 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
5565 hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirect3D2, (
void **)&d3d2);
5566 ok(
hr ==
DD_OK,
"Cannot get IDirect3D2 interface, hr %#lx.\n",
hr);
5567 hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw2, (
void **)&ddraw2);
5568 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw2 interface, hr %#lx.\n",
hr);
5573 if (d3ddevice2 ==
NULL)
5575 win_skip(
"Cannot create IM device, skipping tests.\n");
5577 IDirectDraw2_Release(ddraw2);
5578 IDirectDraw_Release(ddraw1);
5584 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
5588 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM2 interface, hr %#lx.\n",
hr);
5593 ok(device2 ==
NULL,
"Expected device returned == NULL, got %p.\n", device2);
5600 ok(
hr ==
DD_OK,
"Failed to create IDirect3DRMDevice2 interface, hr %#lx\n",
hr);
5602 ok(ref3 > ref1,
"expected ref3 > ref1, got ref1 = %lu , ref3 = %lu.\n", ref1, ref3);
5604 ok(ref3 == ref2,
"expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
5606 ok(device_ref2 > device_ref1,
"Expected device_ref2 > device_ref1, got device_ref1 = %lu, device_ref2 = %lu.\n", device_ref1, device_ref2);
5608 ok(d3d_ref2 > d3d_ref1,
"Expected d3d_ref2 > d3d_ref1, got d3d_ref1 = %lu, d3d_ref2 = %lu.\n", d3d_ref1, d3d_ref2);
5610 ok(ret_val == rc.
right,
"Expected device width = 300, got %lu.\n", ret_val);
5612 ok(ret_val == rc.
bottom,
"Expected device height == 200, got %lu.\n", ret_val);
5616 ok(
hr ==
DD_OK,
"Failed to enumerate surfaces, hr %#lx.\n",
hr);
5617 ok(surface ==
NULL,
"No primary surface should have enumerated (%p).\n", surface);
5620 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice2 interface, hr %#lx.\n",
hr);
5621 ok(d3ddevice2 == d3drm_d3ddevice2,
"Expected Immediate Mode device created == %p, got %p.\n", d3ddevice2, d3drm_d3ddevice2);
5625 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
5629 hr = IDirectDrawSurface_GetSurfaceDesc(surface, &
desc);
5630 ok(
hr ==
DD_OK,
"Cannot get surface desc structure, hr %#lx.\n",
hr);
5632 ok((
desc.dwWidth == rc.
right) && (
desc.dwHeight == rc.
bottom),
"Expected surface dimensions = %lu, %lu, got %lu, %lu.\n",
5635 "Unexpected caps %lx.\n",
desc.ddsCaps.dwCaps);
5637 ok(
desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags,
desc.dwFlags);
5639 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &d3drm_ds);
5640 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
5641 ok(
ds == d3drm_ds,
"Expected depth surface (%p) == surface created internally (%p).\n",
ds, d3drm_ds);
5644 hr = IDirectDrawSurface_GetSurfaceDesc(
ds, &
desc);
5645 ok(
hr ==
DD_OK,
"Cannot get z surface desc structure, hr %#lx.\n",
hr);
5647 ok((
desc.dwWidth == rc.
right) && (
desc.dwHeight == rc.
bottom),
"Expected surface dimensions = %lu, %lu, got %lu, %lu.\n",
5651 ok(
desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags,
desc.dwFlags);
5653 IDirectDrawSurface_Release(d3drm_ds);
5654 IDirectDrawSurface_Release(
ds);
5655 IDirectDrawSurface_Release(surface);
5659 ok(ref1 == ref3,
"expected ref1 == ref3, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
5661 ok(ref3 == ref2,
"expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
5663 ok(device_ref2 == device_ref1,
"Expected device_ref2 == device_ref1, got device_ref1 = %lu, device_ref2 = %lu.\n", device_ref1, device_ref2);
5665 ok(d3d_ref2 == d3d_ref1,
"Expected d3d_ref2 == d3d_ref1, got d3d_ref1 = %lu, d3d_ref2 = %lu.\n", d3d_ref1, d3d_ref2);
5669 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice2 interface, hr %#lx.\n",
hr);
5671 hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirect3D, (
void **)&d3d1);
5682 ok(
SUCCEEDED(
hr),
"Cannot obtain IDirect3DRMDevice interface, hr %#lx.\n",
hr);
5691 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice2 interface, hr %#lx.\n",
hr);
5703 ok(
SUCCEEDED(
hr),
"Failed to initialise IDirect3DRMDevice2 interface, hr %#lx\n",
hr);
5705 ok(ref4 > ref1,
"Expected ref4 > ref1, got ref1 = %lu , ref4 = %lu.\n", ref1, ref4);
5707 ok(device_ref2 > device_ref1,
"Expected device_ref2 > device_ref1, got device_ref1 = %lu, device_ref2 = %lu.\n",
5708 device_ref1, device_ref2);
5710 ok(d3d_ref2 > d3d_ref1,
"Expected d3d_ref2 > d3d_ref1, got d3d_ref1 = %lu, d3d_ref2 = %lu.\n", d3d_ref1, d3d_ref2);
5712 ok(ret_val == rc.
right,
"Expected device width = 300, got %lu.\n", ret_val);
5714 ok(ret_val == rc.
bottom,
"Expected device height == 200, got %lu.\n", ret_val);
5719 ok(ref3 > ref1,
"expected ref3 > ref1, got ref1 = %lu , ref3 = %lu.\n", ref1, ref3);
5721 ok(ref3 > device_ref2,
"Expected ref3 > device_ref2, got ref3 = %lu, device_ref2 = %lu.\n", ref3, device_ref2);
5723 ok(ref3 > d3d_ref2,
"Expected ref3 > d3d_ref2, got ref3 = %lu, d3d_ref2 = %lu.\n", ref3, d3d_ref2);
5730 ok(
SUCCEEDED(
hr),
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
5731 hr = IDirectDraw_QueryInterface(temp_ddraw1, &IID_IDirect3D2, (
void **)&temp_d3d2);
5735 hr = IDirectDraw_QueryInterface(temp_ddraw1, &IID_IDirectDraw2, (
void **)&temp_ddraw2);
5736 ok(
SUCCEEDED(
hr),
"Cannot get IDirectDraw2 interface, hr %#lx.\n",
hr);
5742 ok(ref3 > ref4,
"expected ref3 > ref4, got ref3 = %lu , ref4 = %lu.\n", ref3, ref4);
5744 ok(ref3 == device_ref2,
"Expected ref3 == device_ref2, got ref3 = %lu, device_ref2 = %lu.\n", ref3, device_ref2);
5746 ok(ref3 == d3d_ref2,
"Expected ref3 == d3d_ref2, got ref3 = %lu, d3d_ref2 = %lu.\n", ref3, d3d_ref2);
5751 IDirectDrawSurface_Release(surface);
5752 IDirectDraw2_Release(temp_ddraw2);
5753 IDirectDraw_Release(temp_ddraw1);
5759 ok(surface ==
NULL,
"No primary surface should have enumerated (%p).\n", surface);
5762 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DDevice2 interface, hr %#lx.\n",
hr);
5763 ok(d3ddevice2 == d3drm_d3ddevice2,
"Expected Immediate Mode device created == %p, got %p.\n", d3ddevice2,
5768 ok(
SUCCEEDED(
hr),
"Cannot get surface to the render target, hr %#lx.\n",
hr);
5772 hr = IDirectDrawSurface_GetSurfaceDesc(surface, &
desc);
5773 ok(
SUCCEEDED(
hr),
"Cannot get surface desc structure, hr %#lx.\n",
hr);
5775 ok((
desc.dwWidth == rc.
right) && (
desc.dwHeight == rc.
bottom),
"Expected surface dimensions = %lu, %lu, got %lu, %lu.\n",
5778 "Unexpected caps %#lx.\n",
desc.ddsCaps.dwCaps);
5780 ok(
desc.dwFlags == expected_flags,
"Expected %#lx for flags, got %#lx.\n", expected_flags,
desc.dwFlags);
5782 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &d3drm_ds);
5783 ok(
SUCCEEDED(
hr),
"Cannot get attached depth surface, hr %#lx.\n",
hr);
5784 ok(
ds == d3drm_ds,
"Expected depth surface (%p) == surface created internally (%p).\n",
ds, d3drm_ds);
5787 hr = IDirectDrawSurface_GetSurfaceDesc(
ds, &
desc);
5788 ok(
SUCCEEDED(
hr),
"Cannot get z surface desc structure, hr %#lx.\n",
hr);
5790 ok((
desc.dwWidth == rc.
right) && (
desc.dwHeight == rc.
bottom),
"Expected surface dimensions = %lu, %lu, got %lu, %lu.\n",
5794 ok(
desc.dwFlags == expected_flags,
"Expected %#lx for flags, got %#lx.\n", expected_flags,
desc.dwFlags);
5796 IDirectDrawSurface_Release(d3drm_ds);
5797 IDirectDrawSurface_Release(
ds);
5798 IDirectDrawSurface_Release(surface);
5802 ok(ref1 == ref3,
"Expected ref1 == ref3, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
5804 ok(ref3 == ref2,
"Expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
5806 ok(device_ref2 == device_ref1,
"Expected device_ref2 == device_ref1, got device_ref1 = %lu, device_ref2 = %lu.\n",
5807 device_ref1, device_ref2);
5809 ok(d3d_ref2 == d3d_ref1,
"Expected d3d_ref2 == d3d_ref1, got d3d_ref1 = %lu, d3d_ref2 = %lu.\n", d3d_ref1, d3d_ref2);
5815 IDirectDraw2_Release(ddraw2);
5816 IDirectDraw_Release(ddraw1);
5822 IDirectDraw *ddraw1 =
NULL, *temp_ddraw1;
5823 IDirectDraw2 *ddraw2 =
NULL, *temp_ddraw2;
5825 IDirect3D2 *d3d2 =
NULL, *temp_d3d2;
5826 IDirect3DRM *d3drm1 =
NULL;
5827 IDirect3DRM3 *d3drm3 =
NULL;
5828 IDirect3DRMDevice *device1;
5829 IDirect3DRMDevice3 *device3 = (IDirect3DRMDevice3 *)0xdeadbeef;
5830 IDirect3DDevice *d3ddevice1;
5831 IDirect3DDevice2 *d3ddevice2 =
NULL, *d3drm_d3ddevice2 =
NULL, *temp_d3ddevice2;
5832 IDirectDrawSurface *surface =
NULL, *
ds =
NULL, *d3drm_ds =
NULL;
5833 DWORD expected_flags, ret_val;
5838 ULONG ref1, ref2, ref3, ref4, ref5, device_ref1, device_ref2, d3d_ref1, d3d_ref2;
5842 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
5847 hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirect3D2, (
void **)&d3d2);
5848 ok(
hr ==
DD_OK,
"Cannot get IDirect3D2 interface, hr %#lx.\n",
hr);
5849 hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw2, (
void **)&ddraw2);
5850 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw2 interface, hr %#lx.\n",
hr);
5855 if (d3ddevice2 ==
NULL)
5857 win_skip(
"Cannot create IM device, skipping tests.\n");
5859 IDirectDraw2_Release(ddraw2);
5860 IDirectDraw_Release(ddraw1);
5866 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
5870 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM3 interface, hr %#lx.\n",
hr);
5875 ok(device3 ==
NULL,
"Expected device returned == NULL, got %p.\n", device3);
5882 ok(
hr ==
DD_OK,
"Failed to create IDirect3DRMDevice3 interface, hr %#lx\n",
hr);
5884 ok(ref3 > ref1,
"expected ref3 > ref1, got ref1 = %lu , ref3 = %lu.\n", ref1, ref3);
5886 ok(ref3 == ref2,
"expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
5888 ok(device_ref2 > device_ref1,
"Expected device_ref2 > device_ref1, got device_ref1 = %lu, device_ref2 = %lu.\n", device_ref1, device_ref2);
5890 ok(ret_val == rc.
right,
"Expected device width = 300, got %lu.\n", ret_val);
5892 ok(ret_val == rc.
bottom,
"Expected device height == 200, got %lu.\n", ret_val);
5896 ok(
hr ==
DD_OK,
"Failed to enumerate surfaces, hr %#lx.\n",
hr);
5897 ok(surface ==
NULL,
"No primary surface should have enumerated (%p).\n", surface);
5900 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DDevice2 interface, hr %#lx.\n",
hr);
5901 ok(d3ddevice2 == d3drm_d3ddevice2,
"Expected Immediate Mode device created == %p, got %p.\n", d3ddevice2, d3drm_d3ddevice2);
5905 ok(
hr ==
DD_OK,
"Cannot get surface to the render target, hr %#lx.\n",
hr);
5909 hr = IDirectDrawSurface_GetSurfaceDesc(surface, &
desc);
5910 ok(
hr ==
DD_OK,
"Cannot get surface desc structure, hr %#lx.\n",
hr);
5912 ok((
desc.dwWidth == rc.
right) && (
desc.dwHeight == rc.
bottom),
"Expected surface dimensions = %lu, %lu, got %lu, %lu.\n",
5915 "Unexpected caps %#lx.\n",
desc.ddsCaps.dwCaps);
5917 ok(
desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags,
desc.dwFlags);
5919 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &d3drm_ds);
5920 ok(
hr ==
DD_OK,
"Cannot get attached depth surface, hr %#lx.\n",
hr);
5921 ok(
ds == d3drm_ds,
"Expected depth surface (%p) == surface created internally (%p).\n",
ds, d3drm_ds);
5924 hr = IDirectDrawSurface_GetSurfaceDesc(
ds, &
desc);
5925 ok(
hr ==
DD_OK,
"Cannot get z surface desc structure, hr %#lx.\n",
hr);
5927 ok((
desc.dwWidth == rc.
right) && (
desc.dwHeight == rc.
bottom),
"Expected surface dimensions = %lu, %lu, got %lu, %lu.\n",
5931 ok(
desc.dwFlags == expected_flags,
"Expected %lx for flags, got %lx.\n", expected_flags,
desc.dwFlags);
5933 IDirectDrawSurface_Release(d3drm_ds);
5934 IDirectDrawSurface_Release(
ds);
5935 IDirectDrawSurface_Release(surface);
5939 ok(ref1 == ref3,
"expected ref1 == ref3, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
5941 ok(ref3 == ref2,
"expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
5943 ok(device_ref2 == device_ref1,
"Expected device_ref2 == device_ref1, got device_ref1 = %lu, device_ref2 = %lu.\n", device_ref1, device_ref2);
5945 ok(d3d_ref2 == d3d_ref1,
"Expected d3d_ref2 == d3d_ref1, got d3d_ref1 = %lu, d3d_ref2 = %lu.\n", d3d_ref1, d3d_ref2);
5949 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice3 interface, hr %#lx.\n",
hr);
5951 hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirect3D, (
void **)&d3d1);
5962 ok(
SUCCEEDED(
hr),
"Cannot obtain IDirect3DRMDevice interface, hr %#lx.\n",
hr);
5971 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice3 interface, hr %#lx.\n",
hr);
5983 ok(
SUCCEEDED(
hr),
"Failed to initialise IDirect3DRMDevice2 interface, hr %#lx\n",
hr);
5985 ok(ref4 > ref1,
"Expected ref4 > ref1, got ref1 = %lu , ref4 = %lu.\n", ref1, ref4);
5987 ok(device_ref2 > device_ref1,
"Expected device_ref2 > device_ref1, got device_ref1 = %lu, device_ref2 = %lu.\n",
5988 device_ref1, device_ref2);
5990 ok(d3d_ref2 > d3d_ref1,
"Expected d3d_ref2 > d3d_ref1, got d3d_ref1 = %lu, d3d_ref2 = %lu.\n", d3d_ref1, d3d_ref2);
5992 ok(ret_val == rc.
right,
"Expected device width = 300, got %lu.\n", ret_val);
5994 ok(ret_val == rc.
bottom,
"Expected device height == 200, got %lu.\n", ret_val);
5999 ok(ref3 > ref1,
"expected ref3 > ref1, got ref1 = %lu , ref3 = %lu.\n", ref1, ref3);
6001 ok(ref3 > device_ref2,
"Expected ref3 > device_ref2, got ref3 = %lu, device_ref2 = %lu.\n", ref3, device_ref2);
6003 ok(ref3 > d3d_ref2,
"Expected ref3 > d3d_ref2, got ref3 = %lu, d3d_ref2 = %lu.\n", ref3, d3d_ref2);
6010 ok(
SUCCEEDED(
hr),
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
6011 hr = IDirectDraw_QueryInterface(temp_ddraw1, &IID_IDirect3D2, (
void **)&temp_d3d2);
6015 hr = IDirectDraw_QueryInterface(temp_ddraw1, &IID_IDirectDraw2, (
void **)&temp_ddraw2);
6016 ok(
SUCCEEDED(
hr),
"Cannot get IDirectDraw2 interface, hr %#lx.\n",
hr);
6022 ok(ref3 > ref4,
"expected ref3 > ref4, got ref3 = %lu , ref4 = %lu.\n", ref3, ref4);
6024 ok(ref3 == device_ref2,
"Expected ref3 == device_ref2, got ref3 = %lu, device_ref2 = %lu.\n", ref3, device_ref2);
6026 ok(ref3 == d3d_ref2,
"Expected ref3 == d3d_ref2, got ref3 = %lu, d3d_ref2 = %lu.\n", ref3, d3d_ref2);
6031 IDirectDrawSurface_Release(surface);
6032 IDirectDraw2_Release(temp_ddraw2);
6033 IDirectDraw_Release(temp_ddraw1);
6039 ok(surface ==
NULL,
"No primary surface should have enumerated (%p).\n", surface);
6042 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DDevice2 interface, hr %#lx.\n",
hr);
6043 ok(d3ddevice2 == d3drm_d3ddevice2,
"Expected Immediate Mode device created == %p, got %p.\n", d3ddevice2,
6048 ok(
SUCCEEDED(
hr),
"Cannot get surface to the render target, hr %#lx.\n",
hr);
6052 hr = IDirectDrawSurface_GetSurfaceDesc(surface, &
desc);
6053 ok(
SUCCEEDED(
hr),
"Cannot get surface desc structure, hr %#lx.\n",
hr);
6055 ok((
desc.dwWidth == rc.
right) && (
desc.dwHeight == rc.
bottom),
"Expected surface dimensions = %lu, %lu, got %lu, %lu.\n",
6058 "Unexpected caps %#lx.\n",
desc.ddsCaps.dwCaps);
6060 ok(
desc.dwFlags == expected_flags,
"Expected %#lx for flags, got %#lx.\n", expected_flags,
desc.dwFlags);
6062 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &d3drm_ds);
6063 ok(
SUCCEEDED(
hr),
"Cannot get attached depth surface, hr %#lx.\n",
hr);
6064 ok(
ds == d3drm_ds,
"Expected depth surface (%p) == surface created internally (%p).\n",
ds, d3drm_ds);
6067 hr = IDirectDrawSurface_GetSurfaceDesc(
ds, &
desc);
6068 ok(
SUCCEEDED(
hr),
"Cannot get z surface desc structure, hr %#lx.\n",
hr);
6070 ok((
desc.dwWidth == rc.
right) && (
desc.dwHeight == rc.
bottom),
"Expected surface dimensions = %lu, %lu, got %lu, %lu.\n",
6074 ok(
desc.dwFlags == expected_flags,
"Expected %#lx for flags, got %#lx.\n", expected_flags,
desc.dwFlags);
6076 IDirectDrawSurface_Release(d3drm_ds);
6077 IDirectDrawSurface_Release(
ds);
6078 IDirectDrawSurface_Release(surface);
6082 ok(ref1 == ref3,
"expected ref1 == ref3, got ref1 = %lu, ref3 = %lu.\n", ref1, ref3);
6084 ok(ref3 == ref2,
"expected ref3 == ref2, got ref2 = %lu , ref3 = %lu.\n", ref2, ref3);
6086 ok(device_ref2 == device_ref1,
"Expected device_ref2 == device_ref1, got device_ref1 = %lu, device_ref2 = %lu.\n",
6087 device_ref1, device_ref2);
6089 ok(d3d_ref2 == d3d_ref1,
"Expected d3d_ref2 == d3d_ref1, got d3d_ref1 = %lu, d3d_ref2 = %lu.\n", d3d_ref1, d3d_ref2);
6095 IDirectDraw2_Release(ddraw2);
6096 IDirectDraw_Release(ddraw1);
6103 IDirect3DRMDevice *
device = (IDirect3DRMDevice *)0xdeadbeef;
6107 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
6121 IDirect3DRM2 *d3drm2 =
NULL;
6122 IDirect3DRMDevice2 *device2 = (IDirect3DRMDevice2 *)0xdeadbeef;
6126 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
6128 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM3 interface, hr %#lx.\n",
hr);
6132 ok(device2 ==
NULL,
"Expected device returned == NULL, got %p.\n", device2);
6143 IDirect3DRM3 *d3drm3 =
NULL;
6144 IDirect3DRMDevice3 *device3 = (IDirect3DRMDevice3 *)0xdeadbeef;
6148 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
6150 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRM3 interface, hr %#lx.\n",
hr);
6154 ok(device3 ==
NULL,
"Expected device returned == NULL, got %p.\n", device3);
6168 unsigned int bpp = palettized ? 8 : 24;
6179 ok(
ret,
"Failed to get temporary file path.\n");
6182 ok(
ret,
"Failed to get filename.\n");
6193 ok(
ret && written ==
sizeof(
file_header),
"Failed to write file header.\n");
6196 info->bmiHeader.biSize =
sizeof(
info->bmiHeader);
6197 info->bmiHeader.biBitCount =
bpp;
6198 info->bmiHeader.biPlanes = 1;
6199 info->bmiHeader.biWidth =
w;
6200 info->bmiHeader.biHeight =
h;
6204 for (
i = 0;
i < 256; ++
i)
6212 ok(
ret && written ==
size,
"Failed to write bitmap info.\n");
6232 ok(
ret && written ==
size,
"Failed to write bitmap data.\n");
6241 BOOL upside_down,
unsigned int w,
unsigned int h,
BOOL palettized)
6243 const unsigned char *
data =
img->buffer1;
6246 ok(
img->width ==
w,
"Test %u: Got unexpected image width %u, expected %u.\n", test_idx,
img->width,
w);
6247 ok(
img->height ==
h,
"Test %u: Got unexpected image height %u, expected %u.\n", test_idx,
img->height,
h);
6248 ok(
img->aspectx == 1,
"Test %u: Got unexpected image aspectx %u.\n", test_idx,
img->aspectx);
6249 ok(
img->aspecty == 1,
"Test %u: Got unexpected image aspecty %u.\n", test_idx,
img->aspecty);
6250 ok(!
img->buffer2,
"Test %u: Got unexpected image buffer2 %p.\n", test_idx,
img->buffer2);
6253 if (
w *
h > 256 && !palettized)
6257 ok(
img->depth == 32,
"Test %u: Got unexpected image depth %u.\n", test_idx,
img->depth);
6258 ok(
img->rgb ==
TRUE,
"Test %u: Got unexpected image rgb %#x.\n", test_idx,
img->rgb);
6259 ok(
img->bytes_per_line ==
w * 4,
"Test %u: Got unexpected image bytes per line %u, expected %u.\n",
6260 test_idx,
img->bytes_per_line,
w * 4);
6261 ok(
img->red_mask == 0xff0000,
"Test %u: Got unexpected image red mask %#lx.\n", test_idx,
img->red_mask);
6262 ok(
img->green_mask == 0x00ff00,
"Test %u: Got unexpected image green mask %#lx.\n", test_idx,
img->green_mask);
6263 ok(
img->blue_mask == 0x0000ff,
"Test %u: Got unexpected image blue mask %#lx.\n", test_idx,
img->blue_mask);
6264 ok(!
img->alpha_mask,
"Test %u: Got unexpected image alpha mask %#lx.\n", test_idx,
img->alpha_mask);
6265 ok(!
img->palette_size,
"Test %u: Got unexpected palette size %u.\n", test_idx,
img->palette_size);
6266 ok(!
img->palette,
"Test %u: Got unexpected image palette %p.\n", test_idx,
img->palette);
6267 for (
i = 0;
i <
h; ++
i)
6269 for (
j = 0;
j <
w; ++
j)
6271 const unsigned char *
ptr = &
data[
i *
img->bytes_per_line +
j * 4];
6272 unsigned int idx = upside_down ? (
h - 1 -
i) *
w +
j :
i *
w +
j;
6276 ok(0,
"Test %u: Got unexpected color 0x%02x%02x%02x%02x at position %u, %u, "
6277 "expected 0x%02x%02x%02x%02x.\n", test_idx,
ptr[0],
ptr[1],
ptr[2],
ptr[3],
6286 ok(
img->depth == 8,
"Test %u: Got unexpected image depth %u.\n", test_idx,
img->depth);
6287 ok(!
img->rgb,
"Test %u: Got unexpected image rgb %#x.\n", test_idx,
img->rgb);
6288 ok(
img->red_mask == 0xff,
"Test %u: Got unexpected image red mask %#lx.\n", test_idx,
img->red_mask);
6289 ok(
img->green_mask == 0xff,
"Test %u: Got unexpected image green mask %#lx.\n", test_idx,
img->green_mask);
6290 ok(
img->blue_mask == 0xff,
"Test %u: Got unexpected image blue mask %#lx.\n", test_idx,
img->blue_mask);
6291 ok(!
img->alpha_mask,
"Test %u: Got unexpected image alpha mask %#lx.\n", test_idx,
img->alpha_mask);
6292 ok(!!
img->palette,
"Test %u: Got unexpected image palette %p.\n", test_idx,
img->palette);
6297 ok(
img->bytes_per_line == ((
w + 3) & ~3),
"Test %u: Got unexpected image bytes per line %u, expected %u.\n",
6298 test_idx,
img->bytes_per_line, (
w + 3) & ~3);
6299 ok(
img->palette_size ==
w *
h,
"Test %u: Got unexpected palette size %u, expected %u.\n",
6300 test_idx,
img->palette_size,
w *
h);
6301 for (
i = 0;
i <
img->palette_size; ++
i)
6303 unsigned int idx = upside_down ? (
h - 1) *
w -
i + (
i %
w) * 2 :
i;
6306 "Test %u: Got unexpected palette entry (%u) color 0x%02x%02x%02x.\n",
6307 test_idx,
i,
img->palette[
i].red,
img->palette[
i].green,
img->palette[
i].blue);
6309 "Test %u: Got unexpected palette entry (%u) flags %#x.\n",
6310 test_idx,
i,
img->palette[
i].flags);
6312 for (
i = 0;
i <
h; ++
i)
6314 for (
j = 0;
j <
w; ++
j)
6318 ok(0,
"Test %u: Got unexpected color 0x%02x at position %u, %u, expected 0x%02x.\n",
6329 ok(
img->bytes_per_line ==
w,
"Test %u: Got unexpected image bytes per line %u, expected %u.\n",
6330 test_idx,
img->bytes_per_line,
w);
6331 ok(
img->palette_size == 256,
"Test %u: Got unexpected palette size %u.\n", test_idx,
img->palette_size);
6332 for (
i = 0;
i < 256; ++
i)
6336 "Test %u: Got unexpected palette entry (%u) color 0x%02x%02x%02x.\n",
6337 test_idx,
i,
img->palette[
i].red,
img->palette[
i].green,
img->palette[
i].blue);
6339 "Test %u: Got unexpected palette entry (%u) flags %#x.\n",
6340 test_idx,
i,
img->palette[
i].flags);
6342 for (
i = 0;
i <
h; ++
i)
6344 for (
j = 0;
j <
w; ++
j)
6346 unsigned int idx = upside_down ? (
h - 1 -
i) *
w +
j :
i *
w +
j;
6349 ok(0,
"Test %u: Got unexpected color 0x%02x at position %u, %u, expected 0x%02x.\n",
6359 IDirect3DRMTexture3 *texture3;
6360 IDirect3DRMTexture2 *texture2;
6361 IDirect3DRMTexture *texture1;
6363 IDirect3DRM3 *d3drm3;
6364 IDirect3DRM2 *d3drm2;
6365 IDirect3DRM *d3drm1;
6389 ok(
hr ==
D3DRM_OK,
"Failed to create IDirect3DRM object, hr %#lx.\n",
hr);
6391 ok(
SUCCEEDED(
hr),
"Failed to get IDirect3DRM2 interface, hr %#lx.\n",
hr);
6393 ok(
SUCCEEDED(
hr),
"Failed to get IDirect3DRM3 interface, hr %#lx.\n",
hr);
6397 texture1 = (IDirect3DRMTexture *)0xdeadbeef;
6400 ok(!texture1,
"Got unexpected texture %p.\n", texture1);
6401 texture1 = (IDirect3DRMTexture *)0xdeadbeef;
6404 ok(!texture1,
"Got unexpected texture %p.\n", texture1);
6408 texture2 = (IDirect3DRMTexture2 *)0xdeadbeef;
6411 ok(!texture2,
"Got unexpected texture %p.\n", texture2);
6412 texture2 = (IDirect3DRMTexture2 *)0xdeadbeef;
6415 ok(!texture2,
"Got unexpected texture %p.\n", texture2);
6419 texture3 = (IDirect3DRMTexture3 *)0xdeadbeef;
6422 ok(!texture3,
"Got unexpected texture %p.\n", texture3);
6423 texture3 = (IDirect3DRMTexture3 *)0xdeadbeef;
6426 ok(!texture3,
"Got unexpected texture %p.\n", texture3);
6439 ok(ref2 > ref1,
"Expected ref2 > ref1, got ref1 %lu, ref2 %lu.\n", ref1, ref2);
6446 ok(!!d3drm_img,
"Failed to get image.\n");
6450 ok(ref1 == ref2,
"Expected ref1 == ref2, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
6452 NULL, &IID_IDirect3DRMTexture, (
void **)&texture1);
6459 ok(
SUCCEEDED(
hr),
"Failed to initialise texture from file, hr %#lx.\n",
hr);
6461 ok(!!d3drm_img,
"Failed to get image.\n");
6468 ok(ref2 > ref1,
"Expected ref2 > ref1, got ref1 %lu, ref2 %lu.\n", ref1, ref2);
6474 ok(!!d3drm_img,
"Failed to get image.\n");
6478 ok(ref1 == ref2,
"Expected ref1 == ref2, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
6480 NULL, &IID_IDirect3DRMTexture2, (
void **)&texture2);
6487 ok(
SUCCEEDED(
hr),
"Failed to initialise texture from file, hr %#lx.\n",
hr);
6489 ok(!!d3drm_img,
"Failed to get image.\n");
6496 ok(ref2 > ref1,
"Expected ref2 > ref1, got ref1 %lu, ref2 %lu.\n", ref1, ref2);
6502 ok(!!d3drm_img,
"Failed to get image.\n");
6507 ok(
SUCCEEDED(
hr),
"Failed to get IDirect3DRMTexture interface, hr %#lx.\n",
hr);
6509 ok(!!d3drm_img,
"Failed to get image.\n");
6514 ok(ref1 == ref2,
"Expected ref1 == ref2, got ref1 = %lu, ref2 = %lu.\n", ref1, ref2);
6517 NULL, &IID_IDirect3DRMTexture3, (
void **)&texture3);
6524 ok(
SUCCEEDED(
hr),
"Failed to initialize texture from file, hr %#lx.\n",
hr);
6526 ok(!!d3drm_img,
"Failed to get image.\n");
6568 { &IID_IDirect3DRMTexture2, &
IID_IUnknown, &IID_IDirect3DRMTexture2,
S_OK },
6569 { &IID_IDirect3DRMTexture3, &
IID_IUnknown, &IID_IDirect3DRMTexture3,
S_OK },
6616 IDirect3DRM *d3drm1;
6617 IDirect3DRM2 *d3drm2;
6618 IDirect3DRM3 *d3drm3;
6619 IDirect3DRMTexture *texture1;
6620 IDirect3DRMTexture2 *texture2;
6621 IDirect3DRMTexture3 *texture3;
6631 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture interface, hr %#lx\n",
hr);
6633 ok(
SUCCEEDED(
hr),
"Cannot get IUnknown interface from IDirect3DRMTexture, hr %#lx\n",
hr);
6639 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM2 interface, hr %#lx.\n",
hr);
6643 ok(
SUCCEEDED(
hr),
"Cannot get IUnknown interface from IDirect3DRMTexture2, hr %#lx\n",
hr);
6649 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM3 interface, hr %#lx.\n",
hr);
6652 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture3 interface, hr %#lx\n",
hr);
6654 ok(
SUCCEEDED(
hr),
"Cannot get IUnknown interface from IDirect3DRMTexture3, hr %#lx\n",
hr);
6669 IDirect3DRM *d3drm1;
6670 IDirect3DRM2 *d3drm2;
6671 IDirect3DRM3 *d3drm3;
6672 IDirect3DRMFrame *frame1, *camera1;
6673 IDirect3DRMFrame3 *frame3, *camera3;
6674 IDirect3DRMDevice *device1;
6675 IDirect3DRMDevice3 *device3;
6676 IDirectDrawClipper *clipper;
6677 IDirect3DRMViewport *viewport1;
6678 IDirect3DRMViewport2 *viewport2;
6693 { &IID_IDirect3DRMViewport, &
IID_IUnknown, &IID_IDirect3DRMViewport,
S_OK },
6694 { &IID_IDirect3DRMViewport2, &
IID_IUnknown, &IID_IDirect3DRMViewport2,
S_OK },
6756 ok(
SUCCEEDED(
hr),
"Cannot get IDirectDrawClipper interface, hr %#lx.\n",
hr);
6759 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
6762 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice interface, hr %#lx.\n",
hr);
6764 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMFrame interface, hr %#lx\n",
hr);
6766 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMFrame interface, hr %#lx\n",
hr);
6768 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMViewport interface, hr %#lx\n",
hr);
6776 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM2 interface, hr %#lx.\n",
hr);
6778 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMViewport interface, hr %#lx\n",
hr);
6789 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM3 interface, hr %#lx.\n",
hr);
6791 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMDevice3 interface, hr %#lx.\n",
hr);
6793 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMFrame3 interface, hr %#lx\n",
hr);
6795 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMFrame3 interface, hr %#lx\n",
hr);
6797 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMViewport2 interface, hr %#lx\n",
hr);
6807 IDirectDrawClipper_Release(clipper);
6820 memset(&surface_desc, 0,
sizeof(surface_desc));
6821 surface_desc.dwSize =
sizeof(surface_desc);
6828 color = *((
DWORD *)surface_desc.lpSurface) & 0x00ffffff;
6830 hr = IDirectDrawSurface_Unlock(surface,
NULL);
6838 IDirectDrawSurface *surface;
6849 memset(&surface_desc, 0,
sizeof(surface_desc));
6850 surface_desc.dwSize =
sizeof(surface_desc);
6853 surface_desc.dwWidth = rc.
right;
6854 surface_desc.dwHeight = rc.
bottom;
6856 hr = IDirectDraw2_CreateSurface(
ddraw, &surface_desc, &surface,
NULL);
6859 hr = IDirectDraw2_QueryInterface(
ddraw, &IID_IDirect3D2, (
void **)&d3d);
6862 IDirectDrawSurface_Release(surface);
6869 IDirectDrawSurface_Release(surface);
6879 fx.dwSize =
sizeof(
fx);
6891 memset(&exec_data, 0,
sizeof(exec_data));
6892 exec_data.
dwSize =
sizeof(exec_data);
6906 inst->
bSize =
sizeof(*ts);
6921 inst->
bSize =
sizeof(*rs);
6936 inst->
bSize =
sizeof(*pv);
6954 inst->
bSize =
sizeof(*tri);
6958 tri->
v2 = base_idx + 1;
6959 tri->
v3 = base_idx + 2;
6963 tri->
v1 = base_idx + 2;
6964 tri->
v2 = base_idx + 1;
6965 tri->
v3 = base_idx + 3;
6985 IDirect3DExecuteBuffer *execute_buffer;
6993 1.0f, 0.0f, 0.0f, 0.0f,
6994 0.0f, 1.0f, 0.0f, 0.0f,
6995 0.0f, 0.0f, 1.0f, 0.0f,
6996 0.0f, 0.0f, 0.0f, 1.0f,
7000 {{-1.0f}, {-1.0f}, {0.00f}, 0, {0xffbada55}, {0}, {0.0f}, {0.0f}},
7001 {{-1.0f}, { 1.0f}, {0.00f}, 0, {0xffbada55}, {0}, {0.0f}, {0.0f}},
7002 {{ 1.0f}, {-1.0f}, {1.00f}, 0, {0xffbada55}, {0}, {0.0f}, {0.0f}},
7003 {{ 1.0f}, { 1.0f}, {1.00f}, 0, {0xffbada55}, {0}, {0.0f}, {0.0f}},
7007 ok(
hr ==
D3D_OK,
"Creating a matrix object failed, hr %#lx.\n",
hr);
7009 ok(
hr ==
D3D_OK,
"Setting a matrix object failed, hr %#lx.\n",
hr);
7011 ok(
hr ==
D3D_OK,
"Creating a matrix object failed, hr %#lx.\n",
hr);
7013 ok(
hr ==
D3D_OK,
"Setting a matrix object failed, hr %#lx.\n",
hr);
7015 ok(
hr ==
D3D_OK,
"Creating a matrix object failed, hr %#lx.\n",
hr);
7017 ok(
hr ==
D3D_OK,
"Setting a matrix object failed, hr %#lx.\n",
hr);
7019 memset(&exec_desc, 0,
sizeof(exec_desc));
7020 exec_desc.
dwSize =
sizeof(exec_desc);
7031 memcpy(exec_desc.
lpData, quad_strip,
sizeof(quad_strip));
7047 inst_length -=
sizeof(quad_strip);
7066 IDirectDrawClipper *clipper;
7067 IDirect3DRM *d3drm1;
7068 IDirect3DRMFrame *frame1, *camera1;
7069 IDirect3DRMDevice *device1;
7071 IDirect3DRMViewport *viewport1;
7072 IDirect3DDevice *d3d_device1;
7073 IDirectDrawSurface *surface, *
ds, *d3drm_ds;
7084 ok(
SUCCEEDED(
hr),
"Cannot create IDirectDraw interface, hr %#lx.\n",
hr);
7089 hr = IDirectDraw_CreateClipper(
ddraw, 0, &clipper,
NULL);
7092 hr = IDirectDrawClipper_SetHWnd(clipper, 0,
window);
7096 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
7099 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMDevice interface, hr %#lx\n",
hr);
7102 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMFrame interface, hr %#lx\n",
hr);
7104 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMFrame interface, hr %#lx\n",
hr);
7108 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMViewport2 interface, hr %#lx\n",
hr);
7112 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DDevice interface, hr %#lx.\n",
hr);
7114 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
7117 ok(
SUCCEEDED(
hr),
"Cannot get surface to the render target, hr %#lx.\n",
hr);
7120 ok(
compare_color(ret_color, 0, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7126 ok(ret_color == 0xffffffff,
"Expected scene color returned == 0xffffffff, got %#lx.\n", ret_color);
7130 ok(ret_color == 0xff00ff00,
"Expected scene color returned == 0xff00ff00, got %#lx.\n", ret_color);
7136 ok(
compare_color(ret_color, 0x00ffffff, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7146 ok(
compare_color(ret_color, 0x00ffffff, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7151 ok(ret_color == 0xff0000ff,
"Expected scene color returned == 0xff00ff00, got %#lx.\n", ret_color);
7158 ok(
compare_color(ret_color, 0x000000ff, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7163 ok(
compare_color(ret_color, 0x00bada55, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7165 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &
ds);
7166 ok(
SUCCEEDED(
hr),
"Cannot get attached depth surface, hr %#lx.\n",
hr);
7173 ok(
compare_color(ret_color, 0x000000ff, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7181 ok(
compare_color(ret_color, 0x00bada55, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7184 ok(
compare_color(ret_color, 0x000000ff, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7187 hr = IDirectDrawSurface_DeleteAttachedSurface(surface, 0,
ds);
7189 d3drm_ds = (IDirectDrawSurface *)0xdeadbeef;
7190 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &d3drm_ds);
7192 ok(d3drm_ds ==
NULL,
"Expected NULL z-surface, got %p.\n", d3drm_ds);
7201 ok(
compare_color(ret_color, 0x000000ff, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7203 hr = IDirectDrawSurface_AddAttachedSurface(surface,
ds);
7205 IDirectDrawSurface_Release(
ds);
7210 ok(
compare_color(ret_color, 0x00bada55, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7212 ok(
compare_color(ret_color, 0x000000ff, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7215 IDirectDrawSurface_Release(surface);
7222 IDirectDrawClipper_Release(clipper);
7223 IDirectDraw_Release(
ddraw);
7231 {{-1.0f}, {-1.0f}, {0.0f}, 0, {0xffbada55}, {0}, {0.0f}, {0.0f}},
7232 {{-1.0f}, { 1.0f}, {0.0f}, 0, {0xffbada55}, {0}, {0.0f}, {1.0f}},
7233 {{ 1.0f}, {-1.0f}, {1.0f}, 0, {0xffbada55}, {0}, {1.0f}, {0.0f}},
7234 {{ 1.0f}, { 1.0f}, {1.0f}, 0, {0xffbada55}, {0}, {1.0f}, {1.0f}},
7238 1.0f, 0.0f, 0.0f, 0.0f,
7239 0.0f, 1.0f, 0.0f, 0.0f,
7240 0.0f, 0.0f, 1.0f, 0.0f,
7241 0.0f, 0.0f, 0.0f, 1.0f,
7243 IDirect3DViewport2 *viewport2;
7251 ok(
SUCCEEDED(
hr),
"Failed to set projection transform, hr %#lx.\n",
hr);
7254 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport2 interface, hr %#lx.\n",
hr);
7276 IDirectDraw *ddraw1;
7277 IDirectDraw2 *ddraw2;
7278 IDirectDrawClipper *clipper;
7279 IDirect3DRM *d3drm1;
7280 IDirect3DRM3 *d3drm3;
7281 IDirect3DRMFrame3 *frame3, *camera3;
7282 IDirect3DRMDevice3 *device3;
7284 IDirect3DRMViewport2 *viewport2;
7285 IDirect3DDevice2 *d3d_device2;
7286 IDirectDrawSurface *surface, *
ds, *d3drm_ds;
7297 ok(
SUCCEEDED(
hr),
"Cannot create IDirectDraw interface, hr %#lx.\n",
hr);
7302 hr = IDirectDraw_CreateClipper(ddraw1, 0, &clipper,
NULL);
7305 hr = IDirectDrawClipper_SetHWnd(clipper, 0,
window);
7309 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
7312 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM3 interface, hr %#lx.\n",
hr);
7315 ok(
hr ==
D3DRM_OK,
"Cannot get IDirect3DRMDevice3 interface, hr %#lx.\n",
hr);
7318 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMFrame3 interface, hr %#lx.\n",
hr);
7320 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMFrame3 interface, hr %#lx.\n",
hr);
7324 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMViewport2 interface, hr %#lx.\n",
hr);
7328 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DDevice2 interface, hr %#lx.\n",
hr);
7331 ok(
SUCCEEDED(
hr),
"Cannot get surface to the render target, hr %#lx.\n",
hr);
7334 ok(
compare_color(ret_color, 0, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7340 ok(ret_color == 0xffffffff,
"Expected scene color returned == 0xffffffff, got %#lx.\n", ret_color);
7344 ok(ret_color == 0xff00ff00,
"Expected scene color returned == 0xff00ff00, got %#lx.\n", ret_color);
7350 ok(
compare_color(ret_color, 0x00ffffff, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7360 ok(
compare_color(ret_color, 0x00ffffff, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7366 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DViewport interface, hr %#lx.\n",
hr);
7378 ok(
compare_color(ret_color, 0x00ffffff, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7383 ok(
compare_color(ret_color, 0x00bada55, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7397 ok(
compare_color(ret_color, 0x00ffffff, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7400 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &
ds);
7401 ok(
SUCCEEDED(
hr),
"Cannot get attached depth surface, hr %#lx.\n",
hr);
7407 ok(
compare_color(ret_color, 0x00ffffff, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7409 hr = IDirectDrawSurface_DeleteAttachedSurface(surface, 0,
ds);
7411 d3drm_ds = (IDirectDrawSurface *)0xdeadbeef;
7412 hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &d3drm_ds);
7414 ok(d3drm_ds ==
NULL,
"Expected NULL z-surface, got %p.\n", d3drm_ds);
7424 hr = IDirectDrawSurface_AddAttachedSurface(surface,
ds);
7427 ok(
compare_color(ret_color, 0x00ffffff, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7431 ok(
compare_color(ret_color, 0x00bada55, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7451 ok(
compare_color(ret_color, 0x0000ff00, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7458 ok(
compare_color(ret_color, 0x00ffffff, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7461 IDirectDrawSurface_Release(surface);
7462 IDirectDrawSurface_Release(
ds);
7468 hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw2, (
void **)&ddraw2);
7469 ok(
SUCCEEDED(
hr),
"Cannot get IDirectDraw2 interface, hr %#lx.\n",
hr);
7470 hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirect3D2, (
void **)&d3d2);
7477 ok(
SUCCEEDED(
hr),
"Failed to create IDirect3DRMDevice interface, hr %#lx.\n",
hr);
7480 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMViewport2 interface, hr %#lx.\n",
hr);
7482 ok(
SUCCEEDED(
hr),
"Cannot get surface to the render target, hr %#lx.\n",
hr);
7487 ok(
compare_color(ret_color, 0x00ffffff, 1),
"Got unexpected color 0x%08lx.\n", ret_color);
7492 IDirectDrawSurface_Release(surface);
7502 IDirectDrawClipper_Release(clipper);
7504 IDirectDraw2_Release(ddraw2);
7505 IDirectDraw_Release(ddraw1);
7515 0x000000ff, 0x0000ff00, 0x00ff0000, 0, 0,
NULL
7517 IDirectDrawSurface *surface =
NULL, *surface2 =
NULL, *
ds =
NULL;
7518 IDirect3DRMTexture *texture1;
7519 IDirect3DRMTexture2 *texture2;
7520 IDirect3DRMTexture3 *texture3;
7522 IDirect3DRM *d3drm1 =
NULL;
7523 IDirect3DRM2 *d3drm2 =
NULL;
7524 IDirect3DRM3 *d3drm3 =
NULL;
7525 ULONG ref1, ref2, ref3;
7533 ok(
hr ==
DD_OK,
"Cannot get IDirectDraw interface, hr %#lx.\n",
hr);
7542 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM interface, hr %#lx.\n",
hr);
7545 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM2 interface, hr %#lx.\n",
hr);
7548 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRM3 interface, hr %#lx.\n",
hr);
7565 texture1 = (IDirect3DRMTexture *)0xdeadbeef;
7568 ok(!texture1,
"Expected texture returned == NULL, got %p.\n", texture1);
7573 texture2 = (IDirect3DRMTexture2 *)0xdeadbeef;
7576 ok(!texture2,
"Expected texture returned == NULL, got %p.\n", texture2);
7581 texture3 = (IDirect3DRMTexture3 *)0xdeadbeef;
7584 ok(!texture3,
"Expected texture returned == NULL, got %p.\n", texture3);
7622 ok(
ds == surface,
"Expected same surface back.\n");
7623 IDirectDrawSurface_Release(
ds);
7635 ok(
ds == surface,
"Expected same surface back.\n");
7636 IDirectDrawSurface_Release(
ds);
7653 ok(
SUCCEEDED(
hr),
"Cannot get IDirect3DRMTexture3 interface, hr %#lx.\n",
hr);
7667 IDirectDrawSurface_Release(surface2);
7668 IDirectDrawSurface_Release(surface);
7672 IDirectDraw_Release(
ddraw);
7677 IDirect3DRMAnimation2 *animation2;
7678 IDirect3DRMAnimation *animation;
7680 IDirect3DRMObject *
obj, *obj2;
7682 IDirect3DRMFrame3 *frame3;
7683 IDirect3DRMFrame *frame;
7685 IDirect3DRM *d3drm1;
7692 ok(
SUCCEEDED(
hr),
"Failed to create IDirect3DRM instance, hr %#lx.\n",
hr);
7705 ok(
SUCCEEDED(
hr),
"Failed to get IDirect3DRMAnimation2, hr %#lx.\n",
hr);
7706 ok(animation != (
void *)animation2,
"Expected different interface pointer.\n");
7714 ok(
obj == obj2 &&
obj == (IDirect3DRMObject *)animation,
"Unexpected object pointer.\n");
7736 ok(frame3 != (
void *)frame,
"Unexpected interface pointer.\n");
7758 "Unexpected default options %#lx.\n",
options);
7766 "Unexpected default options %#lx.\n",
options);
7780 "Unexpected default options %#lx.\n",
options);
7846 ok(
keys[1].dvTime == 0.0f,
"Unexpected key time %.8e.\n",
keys[1].dvTime);
7847 ok(
keys[2].dvTime == 0.0f,
"Unexpected key time %.8e.\n",
keys[2].dvTime);
7848 ok(
keys[3].dvTime == 80.0f,
"Unexpected key time %.8e.\n",
keys[3].dvTime);
7849 ok(
keys[4].dvTime == 99.0f,
"Unexpected key time %.8e.\n",
keys[4].dvTime);
7852 ok(
keys[1].dvPositionKey.x == 1.0f,
"Unexpected key position x %.8e.\n",
keys[1].dvPositionKey.x);
7853 ok(
keys[2].dvPositionKey.x == 2.0f,
"Unexpected key position x %.8e.\n",
keys[2].dvPositionKey.x);
7854 ok(
keys[3].dvPositionKey.x == 4.0f,
"Unexpected key position x %.8e.\n",
keys[3].dvPositionKey.x);
7855 ok(
keys[4].dvPositionKey.x == 3.0f,
"Unexpected key position x %.8e.\n",
keys[4].dvPositionKey.x);
7865 switch (
keys[
i].dwKeyType)
7868 ok((
keys[
i].dwID & 0xf0000000) == 0x40000000,
"Unexpected id mask %#lx.\n",
keys[
i].dwID);
7871 ok((
keys[
i].dwID & 0xf0000000) == 0x80000000,
"Unexpected id mask %#lx.\n",
keys[
i].dwID);
7874 ok((
keys[
i].dwID & 0xf0000000) == 0xc0000000,
"Unexpected id mask %#lx.\n",
keys[
i].dwID);
7877 ok(0,
"Unknown key type %ld.\n",
keys[
i].dwKeyType);
7927 key.dwSize =
sizeof(
key) - 1;
7933 key.dwSize =
sizeof(
key) + 1;
7939 key.dwSize =
sizeof(
key);
7941 key.dvPositionKey.x = 8.0f;
7968 ok(
keys[0].dvTime == 0.0f,
"Unexpected key time %.8e.\n",
keys[0].dvTime);
7969 ok(
keys[1].dvTime == 0.0f,
"Unexpected key time %.8e.\n",
keys[1].dvTime);
7970 ok(
keys[2].dvTime == 0.0f,
"Unexpected key time %.8e.\n",
keys[2].dvTime);
7971 ok(
keys[3].dvTime == 0.0f,
"Unexpected key time %.8e.\n",
keys[3].dvTime);
7972 ok(
keys[4].dvTime == 0.0f,
"Unexpected key time %.8e.\n",
keys[4].dvTime);
7973 ok(
keys[5].dvTime == 80.0f,
"Unexpected key time %.8e.\n",
keys[5].dvTime);
7974 ok(
keys[6].dvTime == 99.0f,
"Unexpected key time %.8e.\n",
keys[6].dvTime);
7975 ok(
keys[7].dvTime == 0.0f,
"Unexpected key time %.8e.\n",
keys[7].dvTime);
7976 ok(
keys[8].dvTime == 0.0f,
"Unexpected key time %.8e.\n",
keys[8].dvTime);
8001 ok(
keys[0].dvTime == 0.0f,
"Unexpected key time %.8e.\n",
keys[0].dvTime);
8002 ok(
keys[1].dvTime == 0.0f,
"Unexpected key time %.8e.\n",
keys[1].dvTime);
8003 ok(
keys[2].dvTime == 0.0f,
"Unexpected key time %.8e.\n",
keys[2].dvTime);
8004 ok(
keys[3].dvTime == 80.0f,
"Unexpected key time %.8e.\n",
keys[3].dvTime);
8005 ok(
keys[4].dvTime == 99.0f,
"Unexpected key time %.8e.\n",
keys[4].dvTime);
8006 ok(
keys[5].dvTime == 0.0f,
"Unexpected key time %.8e.\n",
keys[5].dvTime);
8026 { &IID_IDirect3DRMAnimation2, &
IID_IUnknown, &IID_IDirect3DRMAnimation2,
S_OK },
8027 { &IID_IDirect3DRMAnimation, &
IID_IUnknown, &IID_IDirect3DRMAnimation,
S_OK },
8030 { &IID_IDirect3DRMObject, &
IID_IUnknown, &IID_IDirect3DRMAnimation,
S_OK },
8090 IDirect3DRMAnimation2 *animation2;
8091 IDirect3DRMAnimation *animation;
8092 IDirect3DRM3 *d3drm3;
8093 IDirect3DRM *d3drm1;
8104 ok(
SUCCEEDED(
hr),
"Failed to get IUnknown from animation, hr %#lx.\n",
hr);
8117 ok(
SUCCEEDED(
hr),
"Failed to get IUnknown from animation, hr %#lx.\n",
hr);
8129 IDirect3DRMWrap *
wrap;
8130 IDirect3DRM *d3drm1;
8134 ok(
SUCCEEDED(
hr),
"Failed to create IDirect3DRM instance, hr %#lx.\n",
hr);
8214 IDirect3DRMWrap *
wrap;
8215 IDirect3DRM *d3drm1;
8226 ok(
SUCCEEDED(
hr),
"Failed to get IUnknown from wrap, hr %#lx.\n",
hr);
enum _D3DTRANSFORMSTATETYPE D3DTRANSFORMSTATETYPE
#define IDirect3DExecuteBuffer_SetExecuteData(p, a)
#define IDirect3DDevice2_SetCurrentViewport(p, a)
#define D3DERR_SCENE_IN_SCENE
#define IDirect3DDevice_Execute(p, a, b, c)
#define IDirect3D2_CreateDevice(p, a, b, c)
#define IDirect3DDevice_SetMatrix(p, a, b)
#define IDirect3DExecuteBuffer_Release(p)
#define IDirect3DDevice2_QueryInterface(p, a, b)
#define IDirect3DDevice2_BeginScene(p)
#define IDirect3DExecuteBuffer_Lock(p, a)
#define IDirect3DExecuteBuffer_Unlock(p)
#define IDirect3DViewport_GetViewport(p, a)
#define IDirect3D_Release(p)
#define IDirect3DDevice_CreateExecuteBuffer(p, a, b, c)
#define IDirect3DDevice_BeginScene(p)
#define IDirect3DDevice3_Release(p)
#define IDirect3DViewport_Release(p)
#define IDirect3DDevice_EndScene(p)
#define IDirect3DViewport2_Release(p)
#define IDirect3DViewport_QueryInterface(p, a, b)
#define IDirect3DDevice2_SetRenderState(p, a, b)
#define IDirect3DDevice_QueryInterface(p, a, b)
#define IDirect3DDevice2_GetRenderTarget(p, a)
#define IDirect3DDevice2_DrawPrimitive(p, a, b, c, d, e)
#define IDirect3D2_Release(p)
#define IDirect3DDevice2_EndScene(p)
#define IDirect3DDevice2_SetTransform(p, a, b)
#define IDirect3DDevice2_Release(p)
#define IDirect3DDevice_CreateMatrix(p, a)
#define IDirect3DDevice_Release(p)
#define IDirect3DRM_CreateObject(p, a, b, c, d)
#define IDirect3DRM_CreateTextureFromSurface(p, a, b)
#define IDirect3DRM_Load(p, a, b, c, d, e, f, g, h, i, j)
#define IDirect3DRM_CreateMesh(p, a)
#define IDirect3DRM_CreateMeshBuilder(p, a)
#define IDirect3DRM_CreateDeviceFromD3D(p, a, b, c)
#define IDirect3DRM_CreateFace(p, a)
#define D3DRMERR_NOTFOUND
#define IDirect3DRM2_CreateObject(p, a, b, c, d)
#define IDirect3DRM_CreateDeviceFromSurface(p, a, b, c, d)
#define D3DRMERR_NOTCREATEDFROMDDS
#define D3DRMERR_NOSUCHKEY
#define IDirect3DRM2_CreateFrame(p, a, b)
#define IDirect3DRM3_CreateViewport(p, a, b, c, d, e, f, g)
#define IDirect3DRM_CreateViewport(p, a, b, c, d, e, f, g)
#define IDirect3DRM_QueryInterface(p, a, b)
#define IDirect3DRM3_CreateAnimation(p, a)
#define IDirect3DRM_CreateDeviceFromClipper(p, a, b, c, d, e)
#define IDirect3DRM3_CreateTexture(p, a, b)
#define IDirect3DRM_CreateTexture(p, a, b)
#define IDirect3DRM3_LoadTexture(p, a, b)
#define IDirect3DRM_CreateAnimation(p, a)
#define IDirect3DRM2_CreateMeshBuilder(p, a)
#define IDirect3DRM_CreateDevice(p, a, b, c)
#define IDirect3DRM3_CreateDeviceFromClipper(p, a, b, c, d, e)
#define IDirect3DRM2_CreateViewport(p, a, b, c, d, e, f, g)
#define IDirect3DRM3_CreateDeviceFromSurface(p, a, b, c, d, e)
#define D3DRMERR_FILENOTFOUND
#define IDirect3DRM_CreateFrame(p, a, b)
#define D3DRMERR_BADVALUE
#define IDirect3DRM_Release(p)
#define IDirect3DRM3_CreateMaterial(p, a, b)
#define IDirect3DRM_LoadTexture(p, a, b)
#define IDirect3DRM_CreateLight(p, a, b, c)
#define IDirect3DRM2_CreateTexture(p, a, b)
#define IDirect3DRM3_CreateDevice(p, a, b, c)
#define IDirect3DRM_CreateLightRGB(p, a, b, c, d, e)
#define IDirect3DRM2_Release(p)
#define IDirect3DRM2_CreateTextureFromSurface(p, a, b)
#define IDirect3DRM3_CreateFrame(p, a, b)
#define IDirect3DRM2_LoadTexture(p, a, b)
#define D3DRMERR_BADDEVICE
#define IDirect3DRM2_CreateDevice(p, a, b, c)
#define IDirect3DRM2_CreateDeviceFromSurface(p, a, b, c, d)
#define IDirect3DRM3_CreateDeviceFromD3D(p, a, b, c)
#define D3DRMERR_BADOBJECT
#define IDirect3DRM3_CreateObject(p, a, b, c, d)
#define IDirect3DRM3_Release(p)
#define IDirect3DRM2_CreateDeviceFromClipper(p, a, b, c, d, e)
#define IDirect3DRM3_CreateMeshBuilder(p, a)
#define IDirect3DRM3_CreateTextureFromSurface(p, a, b)
#define IDirect3DRM2_CreateDeviceFromD3D(p, a, b, c)
DWORD D3DRMANIMATIONOPTIONS
#define D3DRMANIMATION_LINEARPOSITION
#define D3DRMANIMATION_POSITION
#define D3DRMANIMATION_SCALEKEY
#define D3DRMRENDER_GOURAUD
#define D3DRMDEVICE_NOZBUFFER
D3DVALUE D3DRMMATRIX4D[4][4]
@ D3DRMPROJECT_ORTHOGRAPHIC
@ D3DRMPROJECT_PERSPECTIVE
enum _D3DRMLIGHTTYPE D3DRMLIGHTTYPE
#define D3DRMANIMATION_SCALEANDROTATION
#define D3DRMRENDER_PHONG
#define D3DRMANIMATION_POSITIONKEY
#define D3DRMCLEAR_ZBUFFER
enum _D3DRMPROJECTIONTYPE D3DRMPROJECTIONTYPE
#define D3DRMFRAME_PICKENABLE
#define D3DRMANIMATION_CLOSED
#define D3DRMANIMATION_ROTATEKEY
#define D3DRMANIMATION_SPLINEPOSITION
#define D3DRMLOAD_FROMMEMORY
#define D3DRMANIMATION_OPEN
#define D3DRMFRAME_RENDERENABLE
#define IDirect3DRMMeshBuilder3_SetQuality(p, a)
#define IDirect3DRMAnimation_GetOptions(p)
#define IDirect3DRMFrame_AddLight(p, a)
#define IDirect3DRMViewport_GetClassName(p, a, b)
#define IDirect3DRMTexture3_GetSurface(p, a, b)
#define IDirect3DRMViewport_Release(p)
#define IDirect3DRMViewport2_GetAppData(p)
#define IDirect3DRMMeshBuilder3_GetNormals(p, a, b, c)
#define IDirect3DRMMeshBuilder3_SetTextureCoordinates(p, a, b, c)
#define IDirect3DRMMeshBuilder_GetVertexCount(p)
#define IDirect3DRMFrame_AddRotation(p, a, b, c, d, e)
#define IDirect3DRMFaceArray_GetSize(p)
#define IDirect3DRMMesh_GetGroupCount(p)
#define IDirect3DRMViewport_GetDirect3DViewport(p, a)
#define IDirect3DRMViewport2_SetProjection(p, a)
#define IDirect3DRMMeshBuilder_SetTextureCoordinates(p, a, b, c)
#define IDirect3DRMAnimation_QueryInterface(p, a, b)
#define IDirect3DRMLight_Release(p)
#define IDirect3DRMFrame_GetTransform(p, a)
#define IDirect3DRMTexture3_InitFromFile(p, a)
#define IDirect3DRMFrame_GetVisuals(p, a)
#define IDirect3DRMLightArray_GetElement(p, a, b)
#define IDirect3DRMTexture_GetDecalSize(p, a, b)
#define IDirect3DRMAnimation_AddRotateKey(p, a, b)
#define IDirect3DRMWrap_QueryInterface(p, a, b)
#define IDirect3DRMTexture_InitFromFile(p, a)
#define IDirect3DRMViewport_QueryInterface(p, a, b)
#define IDirect3DRMLightArray_Release(p)
#define IDirect3DRMObject_GetName(p, a, b)
#define IDirect3DRMDevice2_GetDirect3DDevice(p, a)
#define IDirect3DRMViewport2_Configure(p, a, b, c, d)
#define IDirect3DRMMeshBuilder_Scale(p, a, b, c)
#define IDirect3DRMViewport_GetDevice(p, a)
#define IDirect3DRMAnimation2_GetFrame(p, a)
#define IDirect3DRMFace_Release(p)
#define IDirect3DRMVisualArray_Release(p)
#define IDirect3DRMMeshBuilder_GetTextureCoordinates(p, a, b, c)
#define IDirect3DRMObject_QueryInterface(p, a, b)
#define IDirect3DRMFrame3_SetSceneBackgroundRGB(p, a, b, c)
#define IDirect3DRMTexture3_Release(p)
#define IDirect3DRMWrap_Release(p)
#define IDirect3DRMViewport_GetBack(p)
#define IDirect3DRMViewport2_GetFront(p)
#define IDirect3DRMMeshBuilder3_GetTextureCoordinates(p, a, b, c)
#define IDirect3DRMDevice_GetHeight(p)
#define IDirect3DRMFrame_DeleteVisual(p, a)
#define IDirect3DRMMeshBuilder3_GetVertices(p, a, b, c)
#define IDirect3DRMMeshBuilder3_CreateFace(p, a)
#define IDirect3DRMMaterial2_GetEmissive(p, a, b, c)
#define IDirect3DRMAnimation_SetFrame(p, a)
#define IDirect3DRMFace_QueryInterface(p, a, b)
#define IDirect3DRMTexture3_InitFromImage(p, a)
#define IDirect3DRMTexture_SetColors(p, a)
#define IDirect3DRMTexture_GetDecalTransparency(p)
#define IDirect3DRMTexture_QueryInterface(p, a, b)
#define IDirect3DRMViewport2_QueryInterface(p, a, b)
#define IDirect3DRMTexture2_GetImage(p)
#define IDirect3DRMFrame_Release(p)
#define IDirect3DRMViewport_SetFront(p, a)
#define IDirect3DRMMeshBuilder3_GetQuality(p)
#define IDirect3DRMTexture3_GetImage(p)
#define IDirect3DRMViewport2_GetCamera(p, a)
#define IDirect3DRMMaterial_GetSpecular(p, a, b, c)
#define IDirect3DRMFace2_QueryInterface(p, a, b)
#define IDirect3DRMFrame3_GetTraversalOptions(p, a)
#define IDirect3DRMVisualArray_GetSize(p)
#define IDirect3DRMViewport2_Init(p, a, b, c, d, e, f)
#define IDirect3DRMMaterial2_GetSpecular(p, a, b, c)
#define IDirect3DRMMeshBuilder3_GetFaces(p, a)
#define IDirect3DRMDevice_InitFromD3D(p, a, b)
#define IDirect3DRMDevice2_GetHeight(p)
#define IDirect3DRMTexture2_InitFromImage(p, a)
#define IDirect3DRMMeshBuilder3_Load(p, a, b, c, d, e)
#define IDirect3DRMTexture_SetDecalTransparency(p, a)
#define IDirect3DRMMaterial2_GetAmbient(p, a, b, c)
#define IDirect3DRMViewport_GetProjection(p)
#define IDirect3DRMMaterial2_SetPower(p, a)
#define IDirect3DRMFrame_GetParent(p, a)
#define IDirect3DRMMaterial2_GetPower(p)
#define IDirect3DRMTexture_GetColors(p)
#define IDirect3DRMDevice3_QueryInterface(p, a, b)
#define IDirect3DRMMeshBuilder2_GetFaces(p, a)
#define IDirect3DRMViewport2_GetDevice(p, a)
#define IDirect3DRMMaterial2_SetAmbient(p, a, b, c)
#define IDirect3DRMFrame3_QueryInterface(p, a, b)
#define IDirect3DRMViewport_SetAppData(p, a)
#define IDirect3DRMMaterial2_SetEmissive(p, a, b, c)
#define IDirect3DRMFace2_GetColor(p)
#define IDirect3DRMTexture_GetShades(p)
#define IDirect3DRMDevice2_Release(p)
#define IDirect3DRMFrame2_Release(p)
#define IDirect3DRMFrame_AddChild(p, a)
#define IDirect3DRMMaterial_Release(p)
#define IDirect3DRMViewport_GetField(p)
#define IDirect3DRMFrame3_GetSceneBackground(p)
#define IDirect3DRMTexture2_Release(p)
#define IDirect3DRMFrame_GetSceneBackground(p)
#define IDirect3DRMMeshBuilder2_GetFaceCount(p)
#define IDirect3DRMMeshBuilder_Load(p, a, b, c, d, e)
#define IDirect3DRMMeshBuilder3_GetNormalCount(p)
#define IDirect3DRMMeshBuilder_GetFaceCount(p)
#define IDirect3DRMMeshBuilder_GetVertices(p, a, b, c, d, e, f)
#define IDirect3DRMTexture_SetDecalSize(p, a, b)
#define IDirect3DRMViewport_SetPlane(p, a, b, c, d)
#define IDirect3DRMObject_GetClassName(p, a, b)
#define IDirect3DRMAnimation2_GetKeys(p, a, b, c, d)
#define IDirect3DRMAnimation_SetOptions(p, a)
#define IDirect3DRMVisual_Release(p)
#define IDirect3DRMViewport_Render(p, a)
#define IDirect3DRMMeshBuilder3_Release(p)
#define IDirect3DRMFace2_SetColorRGB(p, a, b, c)
#define IDirect3DRMViewport_GetCamera(p, a)
#define IDirect3DRMViewport_Configure(p, a, b, c, d)
#define IDirect3DRMViewport2_SetFront(p, a)
#define IDirect3DRMDevice3_Release(p)
#define IDirect3DRMAnimation_AddScaleKey(p, a, b, c, d)
#define IDirect3DRMViewport_Clear(p)
#define IDirect3DRMFrameArray_GetSize(p)
#define IDirect3DRMViewport2_GetDirect3DViewport(p, a)
#define IDirect3DRMFace_GetVertexCount(p)
#define IDirect3DRMMaterial_GetPower(p)
#define IDirect3DRMViewport_Init(p, a, b, c, d, e, f)
#define IDirect3DRMFace2_GetVertexCount(p)
#define IDirect3DRMViewport2_GetProjection(p)
#define IDirect3DRMDevice2_QueryInterface(p, a, b)
#define IDirect3DRMTexture_InitFromSurface(p, a)
#define IDirect3DRMDevice_GetDirect3DDevice(p, a)
#define IDirect3DRMFace2_Release(p)
#define IDirect3DRMFaceArray_Release(p)
#define IDirect3DRMDevice2_InitFromD3D(p, a, b)
#define IDirect3DRMTexture3_QueryInterface(p, a, b)
#define IDirect3DRMDevice3_GetHeight(p)
#define IDirect3DRMFrame3_SetTraversalOptions(p, a)
#define IDirect3DRMAnimation_AddPositionKey(p, a, b, c, d)
#define IDirect3DRMTexture3_InitFromSurface(p, a)
#define IDirect3DRMDevice3_GetDirect3DDevice2(p, a)
#define IDirect3DRMFrame_QueryInterface(p, a, b)
#define IDirect3DRMFrame_AddTranslation(p, a, b, c, d)
#define IDirect3DRMDevice3_InitFromD3D(p, a, b)
#define IDirect3DRMMeshBuilder3_GetVertexCount(p)
#define IDirect3DRMFrame2_QueryInterface(p, a, b)
#define IDirect3DRMMeshBuilder_QueryInterface(p, a, b)
#define IDirect3DRMTexture_Release(p)
#define IDirect3DRMFrameArray_GetElement(p, a, b)
#define IDirect3DRMFrame_GetChildren(p, a)
#define IDirect3DRMFrame3_Release(p)
#define IDirect3DRMMesh_GetGroup(p, a, b, c, d, e, f)
#define IDirect3DRMMeshBuilder3_QueryInterface(p, a, b)
#define IDirect3DRMFrame_GetLights(p, a)
#define IDirect3DRMObject_DeleteDestroyCallback(p, a, b)
#define IDirect3DRMAnimation_DeleteKey(p, a)
#define IDirect3DRMLight_GetType(p)
#define IDirect3DRMMesh_GetGroupColor(p, a)
#define IDirect3DRMViewport2_SetPlane(p, a, b, c, d)
#define IDirect3DRMFrame_SetSceneBackground(p, a)
#define IDirect3DRMFrame_GetScene(p, a)
#define IDirect3DRMDevice_GetWidth(p)
#define IDirect3DRMViewport_SetProjection(p, a)
#define IDirect3DRMViewport2_SetCamera(p, a)
#define IDirect3DRMTexture_GetImage(p)
#define IDirect3DRMFrame_Transform(p, a, b)
#define IDirect3DRMTexture2_QueryInterface(p, a, b)
#define IDirect3DRMViewport2_SetField(p, a)
#define IDirect3DRMFrame_DeleteLight(p, a)
#define IDirect3DRMDevice2_GetDirect3DDevice2(p, a)
#define IDirect3DRMTexture_GetDecalOrigin(p, a, b)
#define IDirect3DRMFrame_DeleteChild(p, a)
#define IDirect3DRMFace2_SetColor(p, a)
#define IDirect3DRMFrameArray_Release(p)
#define IDirect3DRMAnimation2_SetFrame(p, a)
#define IDirect3DRMMaterial2_SetSpecular(p, a, b, c)
#define IDirect3DRMMeshBuilder2_CreateFace(p, a)
#define IDirect3DRMVisualArray_GetElement(p, a, b)
#define IDirect3DRMDevice_QueryInterface(p, a, b)
#define IDirect3DRMViewport2_Release(p)
#define IDirect3DRMFace_GetVertices(p, a, b, c)
#define IDirect3DRMViewport_GetPlane(p, a, b, c, d)
#define IDirect3DRMFaceArray_GetElement(p, a, b)
#define IDirect3DRMLight_QueryInterface(p, a, b)
#define IDirect3DRMMesh_QueryInterface(p, a, b)
#define IDirect3DRMAnimation2_AddKey(p, a)
#define IDirect3DRMMeshBuilder_GetName(p, a, b)
#define IDirect3DRMViewport2_Clear(p, a)
#define IDirect3DRMViewport2_SetBack(p, a)
#define IDirect3DRMFrame_AddScale(p, a, b, c, d)
#define IDirect3DRMViewport_GetFront(p)
#define IDirect3DRMDevice2_InitFromD3D2(p, a, b)
#define IDirect3DRMTexture2_InitFromFile(p, a)
#define IDirect3DRMViewport_SetBack(p, a)
#define IDirect3DRMObject_SetName(p, a)
#define IDirect3DRMMeshBuilder_CreateMesh(p, a)
#define IDirect3DRMDevice_Release(p)
#define IDirect3DRMViewport2_GetBack(p)
#define IDirect3DRMMesh_GetGroupMaterial(p, a, b)
#define IDirect3DRMMaterial_GetEmissive(p, a, b, c)
#define IDirect3DRMFrame_AddVisual(p, a)
#define IDirect3DRMVisual_QueryInterface(p, a, b)
#define IDirect3DRMMesh_Release(p)
#define IDirect3DRMAnimation2_Release(p)
#define IDirect3DRMAnimation2_QueryInterface(p, a, b)
#define IDirect3DRMObject_AddDestroyCallback(p, a, b)
#define IDirect3DRMViewport_SetField(p, a)
#define IDirect3DRMTexture2_InitFromSurface(p, a)
#define IDirect3DRMLight_SetColorRGB(p, a, b, c)
#define IDirect3DRMMeshBuilder2_Release(p)
#define IDirect3DRMTexture_SetDecalOrigin(p, a, b)
#define IDirect3DRMAnimation_Release(p)
#define IDirect3DRMLightArray_GetSize(p)
#define IDirect3DRMLight_GetColor(p)
#define IDirect3DRMDevice2_GetWidth(p)
#define IDirect3DRMFrame_SetSceneBackgroundRGB(p, a, b, c)
#define IDirect3DRMMeshBuilder3_GetFaceCount(p)
#define IDirect3DRMObject_Release(p)
#define IDirect3DRMViewport_SetCamera(p, a)
#define IDirect3DRMMaterial2_Release(p)
#define IDirect3DRMDevice3_GetWidth(p)
#define IDirect3DRMViewport2_Render(p, a)
#define IDirect3DRMMeshBuilder_SetName(p, a)
#define IDirect3DRMTexture_SetShades(p, a)
#define IDirect3DRMFrame_AddTransform(p, a, b)
#define IDirect3DRMDevice3_InitFromD3D2(p, a, b)
#define IDirect3DRMMesh_GetGroupTexture(p, a, b)
#define IDirect3DRMLight_SetType(p, a)
#define IDirect3DRMViewport2_GetField(p)
#define IDirect3DRMLight_SetColor(p, a)
#define IDirect3DRMViewport2_GetPlane(p, a, b, c, d)
#define IDirect3DRMMeshBuilder_Release(p)
#define IDirect3DRMWinDevice_Release(p)
#define D3DEXECUTE_CLIPPED
#define D3DPROCESSVERTICES_TRANSFORM
HRESULT WINAPI DirectDrawCreateClipper(DWORD dwFlags, LPDIRECTDRAWCLIPPER *lplpDDClipper, LPUNKNOWN pUnkOuter)
HRESULT WINAPI DirectDrawCreate(LPGUID lpGUID, LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnkOuter)
HRESULT WINAPI Direct3DRMCreate(IDirect3DRM **d3drm)
D3DRMQUATERNION *WINAPI D3DRMQuaternionFromRotation(D3DRMQUATERNION *q, D3DVECTOR *v, D3DVALUE theta)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
static void cleanup(void)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI WriteFile(_In_ HANDLE hFile, _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer, _In_ DWORD nNumberOfBytesToWrite, _Out_opt_ LPDWORD lpNumberOfBytesWritten, _Inout_opt_ LPOVERLAPPED lpOverlapped)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
#define check(expected, result)
#define wrap(journal, var)
#define D3DRENDERSTATE_ZENABLE
#define D3DRENDERSTATE_SHADEMODE
#define D3DTRANSFORMSTATE_WORLD
#define D3DRENDERSTATE_ZFUNC
#define D3DTRANSFORMSTATE_VIEW
#define D3DTRANSFORMSTATE_PROJECTION
#define D3DRENDERSTATE_FOGENABLE
#define D3DRENDERSTATE_CULLMODE
#define D3DRENDERSTATE_CLIPPING
#define D3DDEBCAPS_SYSTEMMEMORY
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
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
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
GLdouble GLdouble GLdouble GLdouble q
GLdouble GLdouble GLdouble GLdouble top
GLenum GLuint GLint GLenum face
GLboolean GLboolean GLboolean b
GLboolean GLenum GLenum GLvoid * values
GLfloat GLfloat GLfloat v2
GLubyte GLubyte GLubyte GLubyte w
GLfloat GLfloat GLfloat GLfloat h
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
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 light
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)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static struct test_info tests[]
static IPrintDialogCallback callback
D3D11_SHADER_VARIABLE_DESC desc
static void test_create_device_from_clipper1(void)
static IDirect3DDevice * create_device1(IDirectDraw *ddraw, HWND window, IDirectDrawSurface **ds)
static char data_no_mesh[]
static void test_texture_qi(void)
static void test_animation_qi(void)
static char data_bad_version[]
static void test_Mesh(void)
static void test_Material2(void)
static void vector_eq_(unsigned int line, const D3DVECTOR *left, const D3DVECTOR *right)
#define expect_matrix(m, m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44, u)
static void test_Texture(void)
static void test_object_name_(unsigned int line, IDirect3DRMObject *object)
static void expect_matrix_(unsigned int line, D3DRMMATRIX4D m, float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44, unsigned int ulps)
static void test_qi(const char *test_name, IUnknown *base_iface, REFIID refcount_iid, const struct qi_test *tests, UINT entry_count)
#define test_object_name(a)
static void test_d3drm_qi(void)
static void test_create_device_2(void)
static void emit_tquad(void **ptr, WORD base_idx)
static void test_load_texture(void)
static ULONG get_refcount(IUnknown *object)
static void test_MeshBuilder3(void)
static void test_wrap_qi(void)
static void emit_set_rs(void **ptr, D3DRENDERSTATETYPE state, DWORD value)
static void set_vector(D3DVECTOR *v, float x, float y, float z)
static BOOL compare_uint(unsigned int x, unsigned int y, unsigned int max_diff)
static void clear_depth_surface(IDirectDrawSurface *surface, DWORD value)
static void test_create_device_3(void)
static void test_create_device_from_d3d3(void)
static void test_create_device_from_surface3(void)
static void test_animation(void)
static void test_MeshBuilder(void)
static char data_frame_mesh_materials[]
static void test_create_device_from_clipper2(void)
static void test_Device(void)
static void test_create_device_from_d3d2(void)
static void test_viewport_clear2(void)
static void __cdecl object_load_callback_frame(IDirect3DRMObject *object, REFIID object_guid, void *arg)
static void test_device_qi(void)
static void test_frame_transform(void)
static void test_viewport_qi(void)
IDirect3DRMMeshBuilder * mesh_builder
static BOOL compare_color(D3DCOLOR c1, D3DCOLOR c2, BYTE max_diff)
static IDirect3DDevice2 * create_device2_without_ds(IDirectDraw2 *ddraw, HWND window)
static void emit_end(void **ptr)
static void test_bitmap_data(unsigned int test_idx, const D3DRMIMAGE *img, BOOL upside_down, unsigned int w, unsigned int h, BOOL palettized)
static void test_Light(void)
static void expect_vector_(unsigned int line, const D3DVECTOR *v, float x, float y, float z, unsigned int ulps)
static void test_create_device_1(void)
static void set_execute_data(IDirect3DExecuteBuffer *execute_buffer, UINT vertex_count, UINT offset, UINT len)
static void test_frame_qi(void)
static void test_create_device_from_surface1(void)
static void frame_set_transform(IDirect3DRMFrame *frame, float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44)
static D3DCOLOR get_surface_color(IDirectDrawSurface *surface, UINT x, UINT y)
static void test_create_device_from_surface2(void)
struct callback_order d3drm_corder[3]
static void __cdecl object_load_callback(IDirect3DRMObject *object, REFIID objectguid, void *arg)
static void test_Viewport(void)
static void test_object(void)
static void test_frame_mesh_materials(void)
static void test_create_device_from_d3d1(void)
static void test_create_texture_from_surface(void)
static void draw_quad2(IDirect3DDevice2 *device, IDirect3DViewport *viewport)
static void emit_process_vertices(void **ptr, DWORD flags, WORD base_idx, DWORD vertex_count)
static void d3d_draw_quad1(IDirect3DDevice *device, IDirect3DViewport *viewport)
static void test_destroy_callback(unsigned int test_idx, REFCLSID clsid, REFIID iid)
#define CHECK_REFCOUNT(obj, rc)
static void test_d3drm_load(void)
#define expect_vector(v, x, y, z, u)
static const GUID * refiids[]
#define test_class_name(a, b)
static void test_viewport_clear1(void)
static void CDECL destroy_callback1(IDirect3DRMObject *obj, void *arg)
static char data_d3drm_load[]
static void test_create_device_from_clipper3(void)
static void test_Face(void)
static void test_class_name_(unsigned int line, IDirect3DRMObject *object, const char *name)
static void emit_set_ts(void **ptr, D3DTRANSFORMSTATETYPE state, DWORD value)
static void matrix_sanitise(D3DRMMATRIX4D m)
static void test_wrap(void)
static void test_Frame(void)
static HWND create_window(void)
static IDirect3DDevice2 * create_device2(IDirectDraw2 *ddraw, HWND window, IDirectDrawSurface **ds)
struct callback_order corder[3]
static HRESULT CALLBACK surface_callback(IDirectDrawSurface *surface, DDSURFACEDESC *desc, void *context)
#define compare_float(got, exp)
static const char * test_name
static IHTMLWindow2 * window
static const DWORD file_header[]
static HBITMAP create_bitmap(void)
#define WS_OVERLAPPEDWINDOW
#define IsEqualGUID(rguid1, rguid2)
DWORD IDirectDrawSurface7
BOOL WINAPI AdjustWindowRect(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI DestroyWindow(_In_ HWND)
static struct address_cache * front
#define DDSCAPS_PRIMARYSURFACE
#define DDSD_ZBUFFERBITDEPTH
#define DDERR_INVALIDCAPS
#define DDENUMSURFACES_ALL
#define DDSCAPS_OFFSCREENPLAIN
#define DDENUMSURFACES_DOESEXIST
#define DDERR_NOCLIPPERATTACHED
#define DDSCAPS_SYSTEMMEMORY
DWORD dwInstructionOffset
DWORD dwInstructionLength
D3DTRANSFORMSTATETYPE dtstTransformStateType
D3DRENDERSTATETYPE drstRenderStateType
#define FIELD_OFFSET(t, f)
static WORD const char * driver
DWORD WINAPI GetLastError(void)
#define CLASSFACTORY_E_FIRST
#define CLASS_E_CLASSNOTAVAILABLE