]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
vid_bitsperpixel is now locked to 32.
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 20 May 2018 20:39:22 +0000 (20:39 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 20 May 2018 20:39:22 +0000 (20:39 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12423 d7cf8633-e32d-0410-b094-e92efae38249

menu.c
vid_sdl.c
vid_shared.c

diff --git a/menu.c b/menu.c
index 9d3a4c20f6d039307dd1709e44391377d65037e0..ac1d5c10e2382da0cd41d04b928f2734ba0c5406 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -2943,12 +2943,7 @@ static void M_Video_Draw (void)
        M_Print(96, video_cursor_table[t] + 8, va(vabuf, sizeof(vabuf), "Type: %s", menu_video_resolutions[menu_video_resolution].type));
        t++;
 
        M_Print(96, video_cursor_table[t] + 8, va(vabuf, sizeof(vabuf), "Type: %s", menu_video_resolutions[menu_video_resolution].type));
        t++;
 
-       // Bits per pixel
-       M_Print(16, video_cursor_table[t], "        Bits per pixel");
-       M_Print(220, video_cursor_table[t], (vid_bitsperpixel.integer == 32) ? "32" : "16");
-       t++;
-
-       // Bits per pixel
+       // Antialiasing
        M_Print(16, video_cursor_table[t], "          Antialiasing");
        M_DrawSlider(220, video_cursor_table[t], vid_samples.value, 1, 32);
        t++;
        M_Print(16, video_cursor_table[t], "          Antialiasing");
        M_DrawSlider(220, video_cursor_table[t], vid_samples.value, 1, 32);
        t++;
@@ -3016,8 +3011,6 @@ static void M_Menu_Video_AdjustSliders (int dir)
                                break;
                }
        }
                                break;
                }
        }
-       else if (video_cursor == t++)
-               Cvar_SetValueQuick (&vid_bitsperpixel, (vid_bitsperpixel.integer == 32) ? 16 : 32);
        else if (video_cursor == t++)
                Cvar_SetValueQuick (&vid_samples, bound(1, vid_samples.value * (dir > 0 ? 2 : 0.5), 32));
        else if (video_cursor == t++)
        else if (video_cursor == t++)
                Cvar_SetValueQuick (&vid_samples, bound(1, vid_samples.value * (dir > 0 ? 2 : 0.5), 32));
        else if (video_cursor == t++)
index ca3fa057aa94f546f6ed2fe62233eef030132ec8..097148be1aefc22cb943266f7ac80555b45f4cb2 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -2531,22 +2531,12 @@ static qboolean VID_InitModeGL(viddef_mode_t *mode)
        //flags |= SDL_HWSURFACE;
 
        SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1);
        //flags |= SDL_HWSURFACE;
 
        SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1);
-       if (mode->bitsperpixel >= 32)
-       {
-               SDL_GL_SetAttribute (SDL_GL_RED_SIZE, 8);
-               SDL_GL_SetAttribute (SDL_GL_GREEN_SIZE, 8);
-               SDL_GL_SetAttribute (SDL_GL_BLUE_SIZE, 8);
-               SDL_GL_SetAttribute (SDL_GL_ALPHA_SIZE, 8);
-               SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 24);
-               SDL_GL_SetAttribute (SDL_GL_STENCIL_SIZE, 8);
-       }
-       else
-       {
-               SDL_GL_SetAttribute (SDL_GL_RED_SIZE, 5);
-               SDL_GL_SetAttribute (SDL_GL_GREEN_SIZE, 5);
-               SDL_GL_SetAttribute (SDL_GL_BLUE_SIZE, 5);
-               SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 16);
-       }
+       SDL_GL_SetAttribute (SDL_GL_RED_SIZE, 8);
+       SDL_GL_SetAttribute (SDL_GL_GREEN_SIZE, 8);
+       SDL_GL_SetAttribute (SDL_GL_BLUE_SIZE, 8);
+       SDL_GL_SetAttribute (SDL_GL_ALPHA_SIZE, 8);
+       SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 24);
+       SDL_GL_SetAttribute (SDL_GL_STENCIL_SIZE, 8);
        if (mode->stereobuffer)
                SDL_GL_SetAttribute (SDL_GL_STEREO, 1);
        if (mode->samples > 1)
        if (mode->stereobuffer)
                SDL_GL_SetAttribute (SDL_GL_STEREO, 1);
        if (mode->samples > 1)
index fa51333b82ddd7c0c994f8753843f59704cf064d..4d177b07bcd12fb1a4edd55d1eb82d8f8ec1b4a3 100644 (file)
@@ -137,7 +137,7 @@ cvar_t gl_info_driver = {CVAR_READONLY, "gl_info_driver", "", "name of driver li
 cvar_t vid_fullscreen = {CVAR_SAVE, "vid_fullscreen", "1", "use fullscreen (1) or windowed (0)"};
 cvar_t vid_width = {CVAR_SAVE, "vid_width", "640", "resolution"};
 cvar_t vid_height = {CVAR_SAVE, "vid_height", "480", "resolution"};
 cvar_t vid_fullscreen = {CVAR_SAVE, "vid_fullscreen", "1", "use fullscreen (1) or windowed (0)"};
 cvar_t vid_width = {CVAR_SAVE, "vid_width", "640", "resolution"};
 cvar_t vid_height = {CVAR_SAVE, "vid_height", "480", "resolution"};
-cvar_t vid_bitsperpixel = {CVAR_SAVE, "vid_bitsperpixel", "32", "how many bits per pixel to render at (32 or 16, 32 is recommended)"};
+cvar_t vid_bitsperpixel = {CVAR_READONLY, "vid_bitsperpixel", "32", "how many bits per pixel to render at (this is not currently configurable)"};
 cvar_t vid_samples = {CVAR_SAVE, "vid_samples", "1", "how many anti-aliasing samples per pixel to request from the graphics driver (4 is recommended, 1 is faster)"};
 cvar_t vid_refreshrate = {CVAR_SAVE, "vid_refreshrate", "60", "refresh rate to use, in hz (higher values flicker less, if supported by your monitor)"};
 cvar_t vid_userefreshrate = {CVAR_SAVE, "vid_userefreshrate", "0", "set this to 1 to make vid_refreshrate used, or to 0 to let the engine choose a sane default"};
 cvar_t vid_samples = {CVAR_SAVE, "vid_samples", "1", "how many anti-aliasing samples per pixel to request from the graphics driver (4 is recommended, 1 is faster)"};
 cvar_t vid_refreshrate = {CVAR_SAVE, "vid_refreshrate", "60", "refresh rate to use, in hz (higher values flicker less, if supported by your monitor)"};
 cvar_t vid_userefreshrate = {CVAR_SAVE, "vid_userefreshrate", "0", "set this to 1 to make vid_refreshrate used, or to 0 to let the engine choose a sane default"};
@@ -1720,7 +1720,7 @@ const char *vidfallbacks[][2] =
        {"vid_userefreshrate", "0"},
        {"vid_width", "640"},
        {"vid_height", "480"},
        {"vid_userefreshrate", "0"},
        {"vid_width", "640"},
        {"vid_height", "480"},
-       {"vid_bitsperpixel", "16"},
+       {"vid_bitsperpixel", "32"},
        {NULL, NULL}
 };
 
        {NULL, NULL}
 };
 
@@ -1754,9 +1754,6 @@ void VID_Start(void)
                        Cvar_SetValueQuick(&vid_width, width);
                if (height)
                        Cvar_SetValueQuick(&vid_height, height);
                        Cvar_SetValueQuick(&vid_width, width);
                if (height)
                        Cvar_SetValueQuick(&vid_height, height);
-// COMMANDLINEOPTION: Video: -bpp <bits> performs +vid_bitsperpixel <bits> (example -bpp 32 or -bpp 16)
-               if ((i = COM_CheckParm("-bpp")) != 0)
-                       Cvar_SetQuick(&vid_bitsperpixel, com_argv[i+1]);
 // COMMANDLINEOPTION: Video: -density <multiplier> performs +vid_touchscreen_density <multiplier> (example -density 1 or -density 1.5)
                if ((i = COM_CheckParm("-density")) != 0)
                        Cvar_SetQuick(&vid_touchscreen_density, com_argv[i+1]);
 // COMMANDLINEOPTION: Video: -density <multiplier> performs +vid_touchscreen_density <multiplier> (example -density 1 or -density 1.5)
                if ((i = COM_CheckParm("-density")) != 0)
                        Cvar_SetQuick(&vid_touchscreen_density, com_argv[i+1]);