On Wed, 22 May 2019 at 14:10, Paul Gofman gofmanp@gmail.com wrote:
@@ -3709,26 +3710,41 @@ static void test_lighting(void) { D3DMATRIX *world_matrix; void *quad;
DWORD expected;
DWORD expected, expected_process_vertices;
} tests[] = {BOOL process_vertices_todo; const char *message;
{&mat, nquad, 0x000000ff, "Lit quad with light"},
{&mat_singular, nquad, 0x000000ff, "Lit quad with singular world matrix"},
{&mat_transf, rotatedquad, 0x000000ff, "Lit quad with transformation matrix"},
{&mat_nonaffine, translatedquad, 0x00000000, "Lit quad with non-affine matrix"},
{&mat, nquad, 0x000000ff, 0xff0000ff, FALSE, "Lit quad with light"},
{&mat_singular, nquad, 0x000000ff, 0xff000000, TRUE, "Lit quad with singular world matrix"},
{&mat_transf, rotatedquad, 0x000000ff, 0xff0000ff, FALSE, "Lit quad with transformation matrix"},
};{&mat_nonaffine, translatedquad, 0x00000000, 0xff000000, FALSE, "Lit quad with non-affine matrix"},
If you make the "todo" field the last one in the structure, you only need to explicitly set it when TRUE. (As you do in test_specular_lighting().)
@@ -3737,97 +3753,198 @@ static void test_lighting(void) DestroyWindow(window); return; }
- hr = IDirect3DDevice7_GetDirect3D(device, &d3d);
- ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
- hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw);
You leak this reference.