]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_wgl.c
made darkplaces compile successfully with g++ to test for errors C doesn't care about...
[xonotic/darkplaces.git] / vid_wgl.c
index d15c5b0acad10c516cb13e36a7932e14493bf408..afb773f5d97c8df395ce5e11e4be285cf74d29d8 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -909,14 +909,14 @@ int VID_InitMode (int fullscreen, int width, int height, int bpp)
                return false;
        }
 
-       qglGetString = GL_GetProcAddress("glGetString");
-       qwglGetExtensionsStringARB = GL_GetProcAddress("wglGetExtensionsStringARB");
-       if (qglGetString == NULL)
+       if ((qglGetString = (const GLubyte* (GLAPIENTRY *)(GLenum name))GL_GetProcAddress("glGetString")) == NULL)
        {
                VID_Shutdown();
                Con_Print("glGetString not found\n");
                return false;
        }
+       if ((qwglGetExtensionsStringARB = (const char *(WINAPI *)(HDC hdc))GL_GetProcAddress("wglGetExtensionsStringARB")) == NULL)
+               Con_Print("wglGetExtensionsStringARB not found\n");
        gl_renderer = qglGetString(GL_RENDERER);
        gl_vendor = qglGetString(GL_VENDOR);
        gl_version = qglGetString(GL_VERSION);