1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +00:00

d3drm/tests: Show that viewport::render does not clear the background.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
This commit is contained in:
Alistair Leslie-Hughes 2022-07-18 07:24:36 +10:00 committed by Alexandre Julliard
parent 17b212a5c2
commit fb49ae52d5

View File

@ -7122,6 +7122,15 @@ static void test_viewport_clear1(void)
ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08lx.\n", ret_color);
CHECK_REFCOUNT(frame1, 1);
hr = IDirect3DRMFrame_SetSceneBackgroundRGB(frame1, 0.5f, 0.5f, 0.5f);
ok(SUCCEEDED(hr), "Cannot set scene background RGB, hr %#lx\n", hr);
hr = IDirect3DRMViewport_Render(viewport1, frame1);
ok(SUCCEEDED(hr), "Cannot Render, hr %#lx\n", hr);
ret_color = get_surface_color(surface, 320, 240);
ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08lx.\n", ret_color);
hr = IDirect3DRMFrame_SetSceneBackgroundRGB(frame1, 0.0f, 0.0f, 1.0f);
ok(SUCCEEDED(hr), "Cannot set scene background RGB, hr %#lx\n", hr);
ret_color = IDirect3DRMFrame_GetSceneBackground(frame1);
@ -7327,6 +7336,18 @@ static void test_viewport_clear2(void)
ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08lx.\n", ret_color);
CHECK_REFCOUNT(frame3, 1);
hr = IDirect3DRMFrame3_SetSceneBackgroundRGB(frame3, 0.5f, 0.5f, 0.5f);
ok(SUCCEEDED(hr), "Cannot set scene background RGB, hr %#lx\n", hr);
hr = IDirect3DRMViewport2_Render(viewport2, frame3);
ok(SUCCEEDED(hr), "Cannot Render, hr %#lx\n", hr);
ret_color = get_surface_color(surface, 320, 240);
ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08lx.\n", ret_color);
hr = IDirect3DRMFrame3_SetSceneBackgroundRGB(frame3, 1.0f, 1.0f, 1.0f);
ok(SUCCEEDED(hr), "Cannot set scene background RGB, hr %#lx\n", hr);
hr = IDirect3DRMViewport2_GetDirect3DViewport(viewport2, &d3d_viewport);
ok(SUCCEEDED(hr), "Cannot get IDirect3DViewport interface, hr %#lx.\n", hr);