]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_shared.c
vid_bitsperpixel is now locked to 32.
[xonotic/darkplaces.git] / vid_shared.c
index df3ed5007605c0550235371aac0c51a50d739c3d..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_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"};
@@ -163,7 +163,7 @@ cvar_t vid_touchscreen_showkeyboard = {0, "vid_touchscreen_showkeyboard", "0", "
 cvar_t vid_touchscreen_supportshowkeyboard = {CVAR_READONLY, "vid_touchscreen_supportshowkeyboard", "0", "indicates if the platform supports a virtual keyboard"};
 cvar_t vid_stick_mouse = {CVAR_SAVE, "vid_stick_mouse", "0", "have the mouse stuck in the center of the screen" };
 cvar_t vid_resizable = {CVAR_SAVE, "vid_resizable", "0", "0: window not resizable, 1: resizable, 2: window can be resized but the framebuffer isn't adjusted" };
-cvar_t vid_desktopfullscreen = {CVAR_SAVE, "vid_desktopfullscreen", "0", "force desktop resolution for fullscreen; also use some OS dependent tricks for better fullscreen integration"};
+cvar_t vid_desktopfullscreen = {CVAR_SAVE, "vid_desktopfullscreen", "1", "force desktop resolution for fullscreen; also use some OS dependent tricks for better fullscreen integration"};
 
 cvar_t v_gamma = {CVAR_SAVE, "v_gamma", "1", "inverse gamma correction value, a brightness effect that does not affect white or black, and tends to make the image grey and dull"};
 cvar_t v_contrast = {CVAR_SAVE, "v_contrast", "1", "brightness of white (values above 1 give a brighter image with increased color saturation, unlike v_gamma)"};
@@ -633,26 +633,6 @@ static dllfunction_t texture3dextfuncs[] =
        {NULL, NULL}
 };
 
-static dllfunction_t atiseparatestencilfuncs[] =
-{
-       {"glStencilOpSeparateATI", (void **) &qglStencilOpSeparate},
-       {"glStencilFuncSeparateATI", (void **) &qglStencilFuncSeparate},
-       {NULL, NULL}
-};
-
-static dllfunction_t gl2separatestencilfuncs[] =
-{
-       {"glStencilOpSeparate", (void **) &qglStencilOpSeparate},
-       {"glStencilFuncSeparate", (void **) &qglStencilFuncSeparate},
-       {NULL, NULL}
-};
-
-static dllfunction_t stenciltwosidefuncs[] =
-{
-       {"glActiveStencilFaceEXT", (void **) &qglActiveStencilFaceEXT},
-       {NULL, NULL}
-};
-
 static dllfunction_t blendequationfuncs[] =
 {
        {"glBlendEquationEXT", (void **) &qglBlendEquationEXT},
@@ -887,7 +867,6 @@ void VID_ClearExtensions(void)
        vid.renderpath = RENDERPATH_GL20;
        vid.sRGBcapable2D = false;
        vid.sRGBcapable3D = false;
-       vid.useinterleavedarrays = false;
        vid.forcevbo = false;
        vid.maxtexturesize_2d = 0;
        vid.maxtexturesize_3d = 0;
@@ -955,7 +934,6 @@ void VID_CheckExtensions(void)
        vid.support.arb_texture_non_power_of_two = GL_CheckExtension("GL_ARB_texture_non_power_of_two", NULL, "-notexturenonpoweroftwo", false);
        vid.support.arb_vertex_buffer_object = GL_CheckExtension("GL_ARB_vertex_buffer_object", vbofuncs, "-novbo", false);
        vid.support.arb_uniform_buffer_object = GL_CheckExtension("GL_ARB_uniform_buffer_object", ubofuncs, "-noubo", false);
-       vid.support.ati_separate_stencil = GL_CheckExtension("separatestencil", gl2separatestencilfuncs, "-noseparatestencil", true) || GL_CheckExtension("GL_ATI_separate_stencil", atiseparatestencilfuncs, "-noseparatestencil", false);
        vid.support.ext_blend_minmax = GL_CheckExtension("GL_EXT_blend_minmax", blendequationfuncs, "-noblendminmax", false);
        vid.support.ext_blend_subtract = GL_CheckExtension("GL_EXT_blend_subtract", blendequationfuncs, "-noblendsubtract", false);
        vid.support.ext_blend_func_separate = GL_CheckExtension("GL_EXT_blend_func_separate", blendfuncseparatefuncs, "-noblendfuncseparate", false);
@@ -967,7 +945,6 @@ void VID_CheckExtensions(void)
                vid.support.ext_framebuffer_object = GL_CheckExtension("GL_EXT_framebuffer_object", extfbofuncs, "-nofbo", false);
 
        vid.support.ext_packed_depth_stencil = GL_CheckExtension("GL_EXT_packed_depth_stencil", NULL, "-nopackeddepthstencil", false);
-       vid.support.ext_stencil_two_side = GL_CheckExtension("GL_EXT_stencil_two_side", stenciltwosidefuncs, "-nostenciltwoside", false);
        vid.support.ext_texture_3d = GL_CheckExtension("GL_EXT_texture3D", texture3dextfuncs, "-notexture3d", false);
        vid.support.ext_texture_compression_s3tc = GL_CheckExtension("GL_EXT_texture_compression_s3tc", NULL, "-nos3tc", false);
        vid.support.ext_texture_edge_clamp = GL_CheckExtension("GL_EXT_texture_edge_clamp", NULL, "-noedgeclamp", false) || GL_CheckExtension("GL_SGIS_texture_edge_clamp", NULL, "-noedgeclamp", false);
@@ -994,9 +971,7 @@ void VID_CheckExtensions(void)
 // COMMANDLINEOPTION: GL: -noocclusionquery disables GL_ARB_occlusion_query (which allows coronas to fade according to visibility, and potentially used for rendering optimizations)
 // COMMANDLINEOPTION: GL: -noquerybuffer disables GL_ARB_query_buffer_object (which allows corona fading without synchronous rendering)
 // COMMANDLINEOPTION: GL: -nos3tc disables GL_EXT_texture_compression_s3tc (which allows use of .dds texture caching)
-// COMMANDLINEOPTION: GL: -noseparatestencil disables use of OpenGL2.0 glStencilOpSeparate and GL_ATI_separate_stencil extensions (which accelerate shadow rendering)
 // COMMANDLINEOPTION: GL: -noshadow disables use of GL_ARB_shadow (required for hardware shadowmap filtering)
-// COMMANDLINEOPTION: GL: -nostenciltwoside disables GL_EXT_stencil_two_side (which accelerate shadow rendering)
 // COMMANDLINEOPTION: GL: -notexture3d disables GL_EXT_texture3D (required for spherical lights, otherwise they render as a column)
 // COMMANDLINEOPTION: GL: -notexture4 disables GL_AMD_texture_texture4 (which provides fetch4 sampling)
 // COMMANDLINEOPTION: GL: -notexturecompression disables GL_ARB_texture_compression (which saves video memory if it is supported, but can also degrade image quality, see gl_texturecompression cvar documentation for more information)
@@ -1049,7 +1024,6 @@ void VID_CheckExtensions(void)
                vid.renderpath = RENDERPATH_GL20;
                vid.sRGBcapable2D = false;
                vid.sRGBcapable3D = true;
-               vid.useinterleavedarrays = false;
                Con_Printf("vid.support.arb_multisample %i\n", vid.support.arb_multisample);
                Con_Printf("vid.support.gl20shaders %i\n", vid.support.gl20shaders);
                vid.allowalphatocoverage = true; // but see below, it may get turned to false again if GL_SAMPLES_ARB is <= 1
@@ -1746,7 +1720,7 @@ const char *vidfallbacks[][2] =
        {"vid_userefreshrate", "0"},
        {"vid_width", "640"},
        {"vid_height", "480"},
-       {"vid_bitsperpixel", "16"},
+       {"vid_bitsperpixel", "32"},
        {NULL, NULL}
 };
 
@@ -1780,9 +1754,6 @@ void VID_Start(void)
                        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]);