Module: wine
Branch: master
Commit: eb7f85f691b36969f527dd70db3fb7b4b7d1cd52
URL: http://source.winehq.org/git/wine.git/?a=commit;h=eb7f85f691b36969f527dd70d…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net>
Date: Mon Oct 13 21:10:23 2008 +0200
opengl32/tests: Don't call wglGetProcAddress at the start of the test.
---
dlls/opengl32/tests/opengl.c | 24 ++++++++++++++++--------
1 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c
index b931999..8b5aa4a 100644
--- a/dlls/opengl32/tests/opengl.c
+++ b/dlls/opengl32/tests/opengl.c
@@ -541,14 +541,6 @@ 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());
@@ -585,6 +577,22 @@ START_TEST(opengl)
trace("OpenGL driver version: %s\n", glGetString(GL_VERSION));
trace("OpenGL vendor: %s\n", glGetString(GL_VENDOR));
}
+ else
+ {
+ skip("Skipping OpenGL tests without a current context\n");
+ return;
+ }
+
+ /* Initialisation of WGL functions depends on an implicit WGL context. For this reason we can't load them before making
+ * any WGL call :( On Wine this would work but not on real Windows because there can be different implementations (software, ICD, MCD).
+ */
+ 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;
+ }
test_makecurrent(hdc);
test_setpixelformat(hdc);