From d64424216946b8cd9f5e9488db4a456ad805f294 Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Fri, 17 Aug 2007 19:02:46 +0200 Subject: [PATCH] opengl32/tests: Be a bit more verbose when doing wglGetProcAddress. --- dlls/opengl32/tests/opengl.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index 2aca1d63dad..ccf5e3dd86f 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) -- 2.11.4.GIT