Paul Vriens : opengl32/tests:
Be a bit more verbose when doing wglGetProcAddress.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Aug 20 07:42:37 CDT 2007
Module: wine
Branch: master
Commit: d64424216946b8cd9f5e9488db4a456ad805f294
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d64424216946b8cd9f5e9488db4a456ad805f294
Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date: Fri Aug 17 19:02:46 2007 +0200
opengl32/tests: Be a bit more verbose when doing wglGetProcAddress.
---
dlls/opengl32/tests/opengl.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c
index 2aca1d6..ccf5e3d 100644
--- a/dlls/opengl32/tests/opengl.c
+++ b/dlls/opengl32/tests/opengl.c
@@ -50,17 +50,24 @@ static const char* wgl_extensions = NULL;
static void init_functions(void)
{
+#define GET_PROC(func) \
+ p ## func = (void*)wglGetProcAddress(#func); \
+ if(!p ## func) \
+ trace("wglGetProcAddress(%s) failed\n", #func);
+
/* WGL_ARB_extensions_string */
- pwglGetExtensionsStringARB = (void*)wglGetProcAddress("wglGetExtensionsStringARB");
+ GET_PROC(wglGetExtensionsStringARB)
/* WGL_ARB_pixel_format */
- pwglChoosePixelFormatARB = (void*)wglGetProcAddress("wglChoosePixelFormatARB");
- pwglGetPixelFormatAttribivARB = (void*)wglGetProcAddress("wglGetPixelFormatAttribivARB");
+ GET_PROC(wglChoosePixelFormatARB)
+ GET_PROC(wglGetPixelFormatAttribivARB)
/* WGL_ARB_pbuffer */
- pwglCreatePbufferARB = (void*)wglGetProcAddress("wglCreatePbufferARB");
- pwglGetPbufferDCARB = (void*)wglGetProcAddress("wglGetPbufferDCARB");
- pwglReleasePbufferDCARB = (void*)wglGetProcAddress("wglReleasePbufferDCARB");
+ GET_PROC(wglCreatePbufferARB)
+ GET_PROC(wglGetPbufferDCARB)
+ GET_PROC(wglReleasePbufferDCARB)
+
+#undef GET_PROC
}
static void test_pbuffers(HDC hdc)
More information about the wine-cvs
mailing list