[PATCH] Don't run any WGL tests on systems without wglGetExtensionsStringARB because it indicates broken software rendering or some ancient OpenGL implementation. Any decent cards (even 10 year old Nvidia RivaTNT cards) support wglGetExtensionsStringARB).

Roderick Colenbrander (none) roderick at roderick-laptop.
Sun Sep 28 10:11:34 CDT 2008


---
 dlls/opengl32/tests/opengl.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c
index e72d1a0..036b058 100644
--- a/dlls/opengl32/tests/opengl.c
+++ b/dlls/opengl32/tests/opengl.c
@@ -432,6 +432,14 @@ START_TEST(opengl)
         0, 0, 0                /* layer masks */
     };
 
+    init_functions();
+    /* The lack of wglGetExtensionsStringARB in general means broken software rendering or the lack of decent OpenGL support, skip tests in such cases */
+    if (!pwglGetExtensionsStringARB)
+    {
+        skip("wglGetExtensionsStringARB is not available\n");
+        return;
+    }
+
     hwnd = CreateWindow("static", "Title", WS_OVERLAPPEDWINDOW,
                         10, 10, 200, 200, NULL, NULL, NULL, NULL);
     ok(hwnd != NULL, "err: %d\n", GetLastError());
@@ -462,20 +470,12 @@ START_TEST(opengl)
         hglrc = wglCreateContext(hdc);
         res = wglMakeCurrent(hdc, hglrc);
         ok(res, "wglMakeCurrent failed!\n");
-        init_functions();
 
         test_makecurrent(hdc);
         test_setpixelformat(hdc);
         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");
 
-- 
1.5.4.3


--========GMX187801222618657857876--



More information about the wine-patches mailing list