]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
vid: remove gl_info_driver cvar
authoruis <uis9936@gmail.com>
Wed, 14 Aug 2024 19:52:26 +0000 (22:52 +0300)
committeruis <uis9936@gmail.com>
Sat, 24 Aug 2024 17:55:59 +0000 (20:55 +0300)
vid.h
vid_sdl.c
vid_shared.c

diff --git a/vid.h b/vid.h
index f1d57ab6e842769913bb3da424ff817a0af2cc61..203a16318cbd59fc9c20480ffc2757ceba7e5a77 100644 (file)
--- a/vid.h
+++ b/vid.h
@@ -181,7 +181,6 @@ extern cvar_t gl_info_vendor;
 extern cvar_t gl_info_renderer;
 extern cvar_t gl_info_version;
 extern cvar_t gl_info_extensions;
-extern cvar_t gl_info_driver;
 
 /// brand of graphics chip
 extern const char *gl_vendor;
index 631b0da85de7451d9f2581b40ffff9d36f97bb81..3ad7f3a3218ba246dfac1a0788b053aee076e628 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -1712,8 +1712,6 @@ static qbool VID_InitModeGL(const viddef_mode_t *mode)
 {
        int windowflags = SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL;
        int i;
-       // SDL usually knows best
-       const char *drivername = NULL;
 
        // video display selection (multi-monitor)
        Cvar_SetValueQuick(&vid_info_displaycount, SDL_GetNumVideoDisplays());
@@ -1725,18 +1723,6 @@ static qbool VID_InitModeGL(const viddef_mode_t *mode)
        if(vid_resizable.integer)
                windowflags |= SDL_WINDOW_RESIZABLE;
 
-#ifndef USE_GLES2
-// COMMANDLINEOPTION: SDL GL: -gl_driver <drivername> selects a GL driver library, default is whatever SDL recommends, useful only for 3dfxogl.dll/3dfxvgl.dll or fxmesa or similar, if you don't know what this is for, you don't need it
-       i = Sys_CheckParm("-gl_driver");
-       if (i && i < sys.argc - 1)
-               drivername = sys.argv[i + 1];
-       if (SDL_GL_LoadLibrary(drivername) < 0)
-       {
-               Con_Printf(CON_ERROR "Unable to load GL driver \"%s\": %s\n", drivername, SDL_GetError());
-               return false;
-       }
-#endif
-
 #ifdef DP_MOBILETOUCH
        // mobile platforms are always fullscreen, we'll get the resolution after opening the window
        mode->fullscreen = true;
@@ -1854,7 +1840,6 @@ static qbool VID_InitModeGL(const viddef_mode_t *mode)
        Cvar_SetQuick(&gl_info_vendor, gl_vendor);
        Cvar_SetQuick(&gl_info_renderer, gl_renderer);
        Cvar_SetQuick(&gl_info_version, gl_version);
-       Cvar_SetQuick(&gl_info_driver, drivername ? drivername : "");
 
        for (i = 0; i < vid_info_displaycount.integer; ++i)
                Con_Printf("Display %i: %s\n", i, SDL_GetDisplayName(i));
index 29baba255b76b6aab7fdfcafb9cdef0104add6f2..0aee098cb1c73fea6af72aaad809329bf90c913b 100644 (file)
@@ -129,7 +129,6 @@ cvar_t gl_info_vendor = {CF_CLIENT | CF_READONLY, "gl_info_vendor", "", "indicat
 cvar_t gl_info_renderer = {CF_CLIENT | CF_READONLY, "gl_info_renderer", "", "indicates graphics chip model and other information"};
 cvar_t gl_info_version = {CF_CLIENT | CF_READONLY, "gl_info_version", "", "indicates version of current renderer. begins with 1.0.0, 1.1.0, 1.2.0, 1.3.1 etc."};
 cvar_t gl_info_extensions = {CF_CLIENT | CF_READONLY, "gl_info_extensions", "", "indicates extension list found by engine, space separated."};
-cvar_t gl_info_driver = {CF_CLIENT | CF_READONLY, "gl_info_driver", "", "name of driver library (opengl32.dll, libGL.so.1, or whatever)."};
 
 cvar_t vid_fullscreen = {CF_CLIENT | CF_ARCHIVE, "vid_fullscreen", "1", "use fullscreen (1) or windowed (0)"};
 cvar_t vid_borderless = {CF_CLIENT | CF_ARCHIVE, "vid_borderless", "0", "make the window borderless by removing all window decorations. has no effect in fullscreen mode"};
@@ -1276,7 +1275,6 @@ void VID_Shared_Init(void)
        Cvar_RegisterVariable(&gl_info_renderer);
        Cvar_RegisterVariable(&gl_info_version);
        Cvar_RegisterVariable(&gl_info_extensions);
-       Cvar_RegisterVariable(&gl_info_driver);
        Cvar_RegisterVariable(&v_gamma);
        Cvar_RegisterVariable(&v_brightness);
        Cvar_RegisterVariable(&v_contrastboost);