Commit 1d49ceaa authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

opengl/tests: Don't run Pbuffer tests if no Pbuffer can be created.

parent 2be851c9
...@@ -194,17 +194,18 @@ static void test_pbuffers(HDC hdc) ...@@ -194,17 +194,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 */
/* Test the pixelformat returned by GetPixelFormat on a pbuffer as the behavior is not clear */ pbuffer_hdc = pwglGetPbufferDCARB(pbuffer);
pbuffer_hdc = pwglGetPbufferDCARB(pbuffer); res = GetPixelFormat(pbuffer_hdc);
res = GetPixelFormat(pbuffer_hdc);
ok(res == 1, "Unexpected iPixelFormat=%d (1 expected) returned by GetPixelFormat for offscreen format %d\n", res, iPixelFormat);
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);
trace("iPixelFormat returned by GetPixelFormat: %d\n", res); trace("PixelFormat from wglChoosePixelFormatARB: %d\n", iPixelFormat);
trace("PixelFormat from wglChoosePixelFormatARB: %d\n", iPixelFormat); pwglReleasePbufferDCARB(pbuffer, hdc);
pwglReleasePbufferDCARB(pbuffer, hdc); }
else skip("Pbuffer creation failed!\n");
} }
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");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment