ddraw: Port light delete / add test for ddraw2.

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2019-03-28 14:23:32 +03:00 committed by Alexandre Julliard
parent addc611b2a
commit ce67874d61
1 changed files with 9 additions and 1 deletions

View File

@ -7209,8 +7209,16 @@ static void test_lighting(void)
light_desc.dwFlags = D3DLIGHT_ACTIVE;
hr = IDirect3DLight_SetLight(light, (D3DLIGHT *)&light_desc);
ok(SUCCEEDED(hr), "Failed to set light, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DViewport2_DeleteLight(viewport, light);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
light_desc.dwFlags = 0;
hr = IDirect3DLight_GetLight(light, (D3DLIGHT *)&light_desc);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ok(light_desc.dwFlags == D3DLIGHT_ACTIVE, "Got unexpected flags %#x.\n", light_desc.dwFlags);
hr = IDirect3DViewport2_AddLight(viewport, light);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
hr = IDirect3DDevice2_SetTransform(device, D3DTRANSFORMSTATE_WORLD, tests[i].world_matrix);