1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

opengl32/tests: Test wglChoosePixelFormatARB flags filters.

This commit is contained in:
Rémi Bernon 2022-12-21 19:59:01 +01:00 committed by Alexandre Julliard
parent 409d0f4247
commit 87090965ff

View file

@ -1821,6 +1821,13 @@ static void test_wglChoosePixelFormatARB(HDC hdc)
WGL_SUPPORT_OPENGL_ARB, 1,
0
};
static int attrib_list_flags[] =
{
WGL_DRAW_TO_WINDOW_ARB, 1,
WGL_SUPPORT_OPENGL_ARB, 1,
WGL_SUPPORT_GDI_ARB, 1,
0
};
PIXELFORMATDESCRIPTOR fmt, last_fmt;
BYTE depth, last_depth;
@ -1867,6 +1874,27 @@ static void test_wglChoosePixelFormatARB(HDC hdc)
depth, last_depth, i, formats[i]);
}
}
format_count = 0;
res = pwglChoosePixelFormatARB(hdc, attrib_list_flags, NULL, ARRAY_SIZE(formats), formats, &format_count);
ok(res, "Got unexpected result %d.\n", res);
for (i = 0; i < format_count; ++i)
{
PIXELFORMATDESCRIPTOR format = {0};
BOOL ret;
winetest_push_context("%u", i);
ret = DescribePixelFormat(hdc, formats[i], sizeof(format), &format);
ok(ret, "DescribePixelFormat failed, error %lu\n", GetLastError());
ok(format.dwFlags & PFD_DRAW_TO_WINDOW, "got dwFlags %#lx\n", format.dwFlags);
ok(format.dwFlags & PFD_SUPPORT_OPENGL, "got dwFlags %#lx\n", format.dwFlags);
todo_wine ok(format.dwFlags & PFD_SUPPORT_GDI, "got dwFlags %#lx\n", format.dwFlags);
winetest_pop_context();
}
}
static void test_copy_context(HDC hdc)