Paul Vriens : opengl32/tests: Only use functions if they are implemented.
Alexandre Julliard
julliard at winehq.org
Mon Feb 11 14:19:31 CST 2008
Module: wine
Branch: master
Commit: 82cbbbdb462236d24581ea133de77855eaf4eccb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=82cbbbdb462236d24581ea133de77855eaf4eccb
Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date: Mon Feb 11 17:22:32 2008 +0100
opengl32/tests: Only use functions if they are implemented.
---
dlls/opengl32/tests/opengl.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c
index c244bb8..456bf79 100644
--- a/dlls/opengl32/tests/opengl.c
+++ b/dlls/opengl32/tests/opengl.c
@@ -236,6 +236,12 @@ static void test_colorbits(HDC hdc)
int res;
int iPixelFormat = 0;
+ if (!pwglChoosePixelFormatARB)
+ {
+ skip("wglChoosePixelFormatARB is not available\n");
+ return;
+ }
+
/* We need a pixel format with at least one bit of alpha */
res = pwglChoosePixelFormatARB(hdc, iAttribs, NULL, 1, &iPixelFormat, &nFormats);
if(res == FALSE || nFormats == 0)
@@ -264,6 +270,12 @@ static void test_gdi_dbuf(HDC hdc)
int iPixelFormat;
int res;
+ if (!pwglGetPixelFormatAttribivARB)
+ {
+ skip("wglGetPixelFormatAttribivARB is not available\n");
+ return;
+ }
+
nFormats = DescribePixelFormat(hdc, 0, 0, NULL);
for(iPixelFormat = 1;iPixelFormat <= nFormats;iPixelFormat++)
{
@@ -383,6 +395,13 @@ START_TEST(opengl)
test_colorbits(hdc);
test_gdi_dbuf(hdc);
+ if (!pwglGetExtensionsStringARB)
+ {
+ skip("wglGetExtensionsStringARB is not available\n");
+ DestroyWindow(hwnd);
+ return;
+ }
+
wgl_extensions = pwglGetExtensionsStringARB(hdc);
if(wgl_extensions == NULL) skip("Skipping opengl32 tests because this OpenGL implementation doesn't support WGL extensions!\n");
More information about the wine-cvs
mailing list