mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:32:56 +00:00
[OPENGL32_WINETEST] Sync with Wine Staging 4.0. CORE-15682
This commit is contained in:
parent
b9e3058014
commit
27ad765df6
1 changed files with 21 additions and 23 deletions
|
@ -204,17 +204,18 @@ static void test_pbuffers(HDC hdc)
|
||||||
{
|
{
|
||||||
HDC pbuffer_hdc;
|
HDC pbuffer_hdc;
|
||||||
HPBUFFERARB pbuffer = pwglCreatePbufferARB(hdc, iPixelFormat, 640 /* width */, 480 /* height */, NULL);
|
HPBUFFERARB pbuffer = pwglCreatePbufferARB(hdc, iPixelFormat, 640 /* width */, 480 /* height */, NULL);
|
||||||
if(!pbuffer)
|
if(pbuffer)
|
||||||
skip("Pbuffer creation failed!\n");
|
{
|
||||||
|
/* Test the pixelformat returned by GetPixelFormat on a pbuffer as the behavior is not clear */
|
||||||
|
pbuffer_hdc = pwglGetPbufferDCARB(pbuffer);
|
||||||
|
res = GetPixelFormat(pbuffer_hdc);
|
||||||
|
|
||||||
/* Test the pixelformat returned by GetPixelFormat on a pbuffer as the behavior is not clear */
|
ok(res == 1, "Unexpected iPixelFormat=%d (1 expected) returned by GetPixelFormat for offscreen format %d\n", res, iPixelFormat);
|
||||||
pbuffer_hdc = pwglGetPbufferDCARB(pbuffer);
|
trace("iPixelFormat returned by GetPixelFormat: %d\n", res);
|
||||||
res = GetPixelFormat(pbuffer_hdc);
|
trace("PixelFormat from wglChoosePixelFormatARB: %d\n", iPixelFormat);
|
||||||
|
pwglReleasePbufferDCARB(pbuffer, hdc);
|
||||||
ok(res == 1, "Unexpected iPixelFormat=%d (1 expected) returned by GetPixelFormat for offscreen format %d\n", res, iPixelFormat);
|
}
|
||||||
trace("iPixelFormat returned by GetPixelFormat: %d\n", res);
|
else skip("Pbuffer creation failed!\n");
|
||||||
trace("PixelFormat from wglChoosePixelFormatARB: %d\n", iPixelFormat);
|
|
||||||
pwglReleasePbufferDCARB(pbuffer, hdc);
|
|
||||||
}
|
}
|
||||||
else skip("Pbuffer test for offscreen pixelformat skipped as no offscreen-only format with pbuffer capabilities has been found\n");
|
else skip("Pbuffer test for offscreen pixelformat skipped as no offscreen-only format with pbuffer capabilities has been found\n");
|
||||||
}
|
}
|
||||||
|
@ -249,8 +250,7 @@ static void test_choosepixelformat(void)
|
||||||
PIXELFORMATDESCRIPTOR pfd = {
|
PIXELFORMATDESCRIPTOR pfd = {
|
||||||
sizeof(PIXELFORMATDESCRIPTOR),
|
sizeof(PIXELFORMATDESCRIPTOR),
|
||||||
1, /* version */
|
1, /* version */
|
||||||
PFD_DRAW_TO_WINDOW |
|
PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL,
|
||||||
PFD_SUPPORT_OPENGL |
|
|
||||||
PFD_TYPE_RGBA,
|
PFD_TYPE_RGBA,
|
||||||
0, /* color depth */
|
0, /* color depth */
|
||||||
0, 0, 0, 0, 0, 0, /* color bits */
|
0, 0, 0, 0, 0, 0, /* color bits */
|
||||||
|
@ -585,7 +585,7 @@ static void test_colorbits(HDC hdc)
|
||||||
{
|
{
|
||||||
const int iAttribList[] = { WGL_COLOR_BITS_ARB, WGL_RED_BITS_ARB, WGL_GREEN_BITS_ARB,
|
const int iAttribList[] = { WGL_COLOR_BITS_ARB, WGL_RED_BITS_ARB, WGL_GREEN_BITS_ARB,
|
||||||
WGL_BLUE_BITS_ARB, WGL_ALPHA_BITS_ARB };
|
WGL_BLUE_BITS_ARB, WGL_ALPHA_BITS_ARB };
|
||||||
int iAttribRet[sizeof(iAttribList)/sizeof(iAttribList[0])];
|
int iAttribRet[ARRAY_SIZE(iAttribList)];
|
||||||
const int iAttribs[] = { WGL_ALPHA_BITS_ARB, 1, 0 };
|
const int iAttribs[] = { WGL_ALPHA_BITS_ARB, 1, 0 };
|
||||||
unsigned int nFormats;
|
unsigned int nFormats;
|
||||||
BOOL res;
|
BOOL res;
|
||||||
|
@ -605,8 +605,8 @@ static void test_colorbits(HDC hdc)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0,
|
res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, ARRAY_SIZE(iAttribList), iAttribList,
|
||||||
sizeof(iAttribList)/sizeof(iAttribList[0]), iAttribList, iAttribRet);
|
iAttribRet);
|
||||||
if(res == FALSE)
|
if(res == FALSE)
|
||||||
{
|
{
|
||||||
skip("wglGetPixelFormatAttribivARB failed\n");
|
skip("wglGetPixelFormatAttribivARB failed\n");
|
||||||
|
@ -620,7 +620,7 @@ static void test_colorbits(HDC hdc)
|
||||||
static void test_gdi_dbuf(HDC hdc)
|
static void test_gdi_dbuf(HDC hdc)
|
||||||
{
|
{
|
||||||
const int iAttribList[] = { WGL_SUPPORT_GDI_ARB, WGL_DOUBLE_BUFFER_ARB };
|
const int iAttribList[] = { WGL_SUPPORT_GDI_ARB, WGL_DOUBLE_BUFFER_ARB };
|
||||||
int iAttribRet[sizeof(iAttribList)/sizeof(iAttribList[0])];
|
int iAttribRet[ARRAY_SIZE(iAttribList)];
|
||||||
unsigned int nFormats;
|
unsigned int nFormats;
|
||||||
int iPixelFormat;
|
int iPixelFormat;
|
||||||
BOOL res;
|
BOOL res;
|
||||||
|
@ -634,9 +634,8 @@ static void test_gdi_dbuf(HDC hdc)
|
||||||
nFormats = DescribePixelFormat(hdc, 0, 0, NULL);
|
nFormats = DescribePixelFormat(hdc, 0, 0, NULL);
|
||||||
for(iPixelFormat = 1;iPixelFormat <= nFormats;iPixelFormat++)
|
for(iPixelFormat = 1;iPixelFormat <= nFormats;iPixelFormat++)
|
||||||
{
|
{
|
||||||
res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0,
|
res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, ARRAY_SIZE(iAttribList),
|
||||||
sizeof(iAttribList)/sizeof(iAttribList[0]), iAttribList,
|
iAttribList, iAttribRet);
|
||||||
iAttribRet);
|
|
||||||
ok(res!=FALSE, "wglGetPixelFormatAttribivARB failed for pixel format %d\n", iPixelFormat);
|
ok(res!=FALSE, "wglGetPixelFormatAttribivARB failed for pixel format %d\n", iPixelFormat);
|
||||||
if(res == FALSE)
|
if(res == FALSE)
|
||||||
continue;
|
continue;
|
||||||
|
@ -648,7 +647,7 @@ static void test_gdi_dbuf(HDC hdc)
|
||||||
static void test_acceleration(HDC hdc)
|
static void test_acceleration(HDC hdc)
|
||||||
{
|
{
|
||||||
const int iAttribList[] = { WGL_ACCELERATION_ARB };
|
const int iAttribList[] = { WGL_ACCELERATION_ARB };
|
||||||
int iAttribRet[sizeof(iAttribList)/sizeof(iAttribList[0])];
|
int iAttribRet[ARRAY_SIZE(iAttribList)];
|
||||||
unsigned int nFormats;
|
unsigned int nFormats;
|
||||||
int iPixelFormat;
|
int iPixelFormat;
|
||||||
int res;
|
int res;
|
||||||
|
@ -663,9 +662,8 @@ static void test_acceleration(HDC hdc)
|
||||||
nFormats = DescribePixelFormat(hdc, 0, 0, NULL);
|
nFormats = DescribePixelFormat(hdc, 0, 0, NULL);
|
||||||
for(iPixelFormat = 1; iPixelFormat <= nFormats; iPixelFormat++)
|
for(iPixelFormat = 1; iPixelFormat <= nFormats; iPixelFormat++)
|
||||||
{
|
{
|
||||||
res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0,
|
res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, ARRAY_SIZE(iAttribList),
|
||||||
sizeof(iAttribList)/sizeof(iAttribList[0]), iAttribList,
|
iAttribList, iAttribRet);
|
||||||
iAttribRet);
|
|
||||||
ok(res!=FALSE, "wglGetPixelFormatAttribivARB failed for pixel format %d\n", iPixelFormat);
|
ok(res!=FALSE, "wglGetPixelFormatAttribivARB failed for pixel format %d\n", iPixelFormat);
|
||||||
if(res == FALSE)
|
if(res == FALSE)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue