]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Removed GL_OpenLibrary and GL_CloseLibrary from "vid.h" and "vid_null.c"
authormolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 31 Mar 2005 05:41:44 +0000 (05:41 +0000)
committermolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 31 Mar 2005 05:41:44 +0000 (05:41 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5134 d7cf8633-e32d-0410-b094-e92efae38249

vid.h
vid_glx.c
vid_null.c
vid_wgl.c

diff --git a/vid.h b/vid.h
index dbaa81aafc285c12ef1b590d8a21535412f177c6..e845edd6ede8cac65c39b74f282473e019c5e879 100644 (file)
--- a/vid.h
+++ b/vid.h
@@ -96,8 +96,6 @@ extern qboolean isRagePro;
 // LordHavoc: GLX_SGI_swap_control and WGL_EXT_swap_control
 extern int gl_videosyncavailable;
 
 // LordHavoc: GLX_SGI_swap_control and WGL_EXT_swap_control
 extern int gl_videosyncavailable;
 
-int GL_OpenLibrary(const char *name);
-void GL_CloseLibrary(void);
 void *GL_GetProcAddress(const char *name);
 int GL_CheckExtension(const char *name, const dllfunction_t *funcs, const char *disableparm, int silent);
 
 void *GL_GetProcAddress(const char *name);
 int GL_CheckExtension(const char *name, const dllfunction_t *funcs, const char *disableparm, int silent);
 
index 70336a9c216c1fa2b2c49e77f700b2bb56df114d..aa86a167961ef98fc0174235a2c197459ce227a4 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -551,6 +551,43 @@ static void IN_ActivateMouse( void )
        }
 }
 
        }
 }
 
+static void *prjobj = NULL;
+
+static void GL_CloseLibrary(void)
+{
+       if (prjobj)
+               dlclose(prjobj);
+       prjobj = NULL;
+       gl_driver[0] = 0;
+       qglXGetProcAddressARB = NULL;
+       gl_extensions = "";
+       gl_platform = "";
+       gl_platformextensions = "";
+}
+
+static int GL_OpenLibrary(const char *name)
+{
+       Con_Printf("Loading OpenGL driver %s\n", name);
+       GL_CloseLibrary();
+       if (!(prjobj = dlopen(name, RTLD_LAZY)))
+       {
+               Con_Printf("Unable to open symbol list for %s\n", name);
+               return false;
+       }
+       strcpy(gl_driver, name);
+       return true;
+}
+
+void *GL_GetProcAddress(const char *name)
+{
+       void *p = NULL;
+       if (qglXGetProcAddressARB != NULL)
+               p = (void *) qglXGetProcAddressARB(name);
+       if (p == NULL)
+               p = (void *) dlsym(prjobj, name);
+       return p;
+}
+
 void VID_Shutdown(void)
 {
        if (!ctx || !vidx11_display)
 void VID_Shutdown(void)
 {
        if (!ctx || !vidx11_display)
@@ -907,41 +944,3 @@ void IN_Move (void)
        mouse_x = 0;
        mouse_y = 0;
 }
        mouse_x = 0;
        mouse_y = 0;
 }
-
-static void *prjobj = NULL;
-
-int GL_OpenLibrary(const char *name)
-{
-       Con_Printf("Loading OpenGL driver %s\n", name);
-       GL_CloseLibrary();
-       if (!(prjobj = dlopen(name, RTLD_LAZY)))
-       {
-               Con_Printf("Unable to open symbol list for %s\n", name);
-               return false;
-       }
-       strcpy(gl_driver, name);
-       return true;
-}
-
-void GL_CloseLibrary(void)
-{
-       if (prjobj)
-               dlclose(prjobj);
-       prjobj = NULL;
-       gl_driver[0] = 0;
-       qglXGetProcAddressARB = NULL;
-       gl_extensions = "";
-       gl_platform = "";
-       gl_platformextensions = "";
-}
-
-void *GL_GetProcAddress(const char *name)
-{
-       void *p = NULL;
-       if (qglXGetProcAddressARB != NULL)
-               p = (void *) qglXGetProcAddressARB(name);
-       if (p == NULL)
-               p = (void *) dlsym(prjobj, name);
-       return p;
-}
-
index 7daea1e5b02fb3e32b5c901391ec61d990ece0f0..19af599e4ec84bc71fdf902893140bc269b7821d 100644 (file)
@@ -80,15 +80,6 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp)
        return false;
 }
 
        return false;
 }
 
-int GL_OpenLibrary(const char *name)
-{
-       return false;
-}
-
-void GL_CloseLibrary(void)
-{
-}
-
 void *GL_GetProcAddress(const char *name)
 {
        return NULL;
 void *GL_GetProcAddress(const char *name)
 {
        return NULL;
index 1595e798afa9ec42efceb7b436cecaa3ab7142d4..b76da3d608cb2935c81f64d2ba30200449132bc3 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -693,7 +693,18 @@ int VID_GetGamma(unsigned short *ramps)
 
 static HINSTANCE gldll;
 
 
 static HINSTANCE gldll;
 
-int GL_OpenLibrary(const char *name)
+static void GL_CloseLibrary(void)
+{
+       FreeLibrary(gldll);
+       gldll = 0;
+       gl_driver[0] = 0;
+       qwglGetProcAddress = NULL;
+       gl_extensions = "";
+       gl_platform = "";
+       gl_platformextensions = "";
+}
+
+static int GL_OpenLibrary(const char *name)
 {
        Con_Printf("Loading OpenGL driver %s\n", name);
        GL_CloseLibrary();
 {
        Con_Printf("Loading OpenGL driver %s\n", name);
        GL_CloseLibrary();
@@ -706,17 +717,6 @@ int GL_OpenLibrary(const char *name)
        return true;
 }
 
        return true;
 }
 
-void GL_CloseLibrary(void)
-{
-       FreeLibrary(gldll);
-       gldll = 0;
-       gl_driver[0] = 0;
-       qwglGetProcAddress = NULL;
-       gl_extensions = "";
-       gl_platform = "";
-       gl_platformextensions = "";
-}
-
 void *GL_GetProcAddress(const char *name)
 {
        void *p = NULL;
 void *GL_GetProcAddress(const char *name)
 {
        void *p = NULL;