From f97a302060bb0bbccceb90ab8506adefeb40d47e Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 21 Oct 2005 06:32:19 +0000 Subject: [PATCH] added explicit casts for agl functions when calling GL_GetProcAddress git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5753 d7cf8633-e32d-0410-b094-e92efae38249 --- vid_agl.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vid_agl.c b/vid_agl.c index aa7e8b01..e5b92069 100644 --- 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"); -- 2.39.2