]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added explicit casts for agl functions when calling GL_GetProcAddress
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 21 Oct 2005 06:32:19 +0000 (06:32 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 21 Oct 2005 06:32:19 +0000 (06:32 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5753 d7cf8633-e32d-0410-b094-e92efae38249

vid_agl.c

index aa7e8b01f9c057f7f7711f106f84ad169ae7d8f4..e5b920691c50e925ceea377e3e1f811ed432a45b 100644 (file)
--- a/vid_agl.c
+++ b/vid_agl.c
@@ -319,14 +319,14 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp)
                return false;
        }
 
-       if ((qaglChoosePixelFormat = GL_GetProcAddress("aglChoosePixelFormat")) == NULL
-        || (qaglCreateContext = GL_GetProcAddress("aglCreateContext")) == NULL
-        || (qaglDestroyContext = GL_GetProcAddress("aglDestroyContext")) == NULL
-        || (qaglDestroyPixelFormat = GL_GetProcAddress("aglDestroyPixelFormat")) == NULL
-        || (qaglSetCurrentContext = GL_GetProcAddress("aglSetCurrentContext")) == NULL
-        || (qaglSetDrawable = GL_GetProcAddress("aglSetDrawable")) == NULL
-        || (qaglSetFullScreen = GL_GetProcAddress("aglSetFullScreen")) == NULL
-        || (qaglSwapBuffers = GL_GetProcAddress("aglSwapBuffers")) == NULL
+       if ((qaglChoosePixelFormat = (AGLPixelFormat (*) (const AGLDevice *gdevs, GLint ndev, const GLint *attribList))GL_GetProcAddress("aglChoosePixelFormat")) == NULL
+        || (qaglCreateContext = (AGLContext (*) (AGLPixelFormat pix, AGLContext share))GL_GetProcAddress("aglCreateContext")) == NULL
+        || (qaglDestroyContext = (GLboolean (*) (AGLContext ctx))GL_GetProcAddress("aglDestroyContext")) == NULL
+        || (qaglDestroyPixelFormat = (void (*) (AGLPixelFormat pix))GL_GetProcAddress("aglDestroyPixelFormat")) == NULL
+        || (qaglSetCurrentContext = (GLboolean (*) (AGLContext ctx))GL_GetProcAddress("aglSetCurrentContext")) == NULL
+        || (qaglSetDrawable = (GLboolean (*) (AGLContext ctx, AGLDrawable draw))GL_GetProcAddress("aglSetDrawable")) == NULL
+        || (qaglSetFullScreen = (GLboolean (*) (AGLContext ctx, GLsizei width, GLsizei height, GLsizei freq, GLint device))GL_GetProcAddress("aglSetFullScreen")) == NULL
+        || (qaglSwapBuffers = (void (*) (AGLContext ctx))GL_GetProcAddress("aglSwapBuffers")) == NULL
        )
        {
                Con_Printf("AGL functions not found\n");