]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
menu: video settings: add support for GL32 renderer (DP master) 997/head
authorbones_was_here <bones_was_here@xa.org.au>
Wed, 6 Apr 2022 07:04:58 +0000 (17:04 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Wed, 6 Apr 2022 07:23:34 +0000 (17:23 +1000)
It uses viewscale for antialiasing, instead of vid_samples

qcsrc/menu/xonotic/dialog_settings_video.qc
xonotic-client.cfg

index 0ece0271c98a0be341d0bf9b8b02217635d81a64..39d952826455c2d4432e14a7ccf335a8cca0fced 100644 (file)
@@ -62,10 +62,13 @@ void XonoticVideoSettingsTab_fill(entity me)
                        _("Vsync prevents tearing, but increases latency and caps your fps at the screen refresh rate")));
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "r_viewfbo", _("High-quality frame buffer")));
+               if(cvar_type("vid_gl20") & CVAR_TYPEFLAG_ENGINE)
                        setDependent(e, "vid_samples", 0, 1);
 
        me.TR(me);
        me.TR(me);
+       if(cvar_type("vid_gl20") & CVAR_TYPEFLAG_ENGINE)
+       {
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Antialiasing:")));
                        setDependent(e, "r_viewfbo", 0, 0);
                me.TD(me, 1, 2, e = makeXonoticTextSlider_T("vid_samples",
@@ -76,6 +79,13 @@ void XonoticVideoSettingsTab_fill(entity me)
                        e.configureXonoticTextSliderValues(e);
                        setDependent(e, "r_viewfbo", 0, 0);
                        e.applyButton = videoApplyButton;
+       }
+       else
+       {
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Resolution scaling:")));
+               me.TD(me, 1, 2, e = makeXonoticSlider_T(0.5, 2, 0.25, "r_viewscale",
+                       _("Screen or window size multiplier, above 1x does antialiasing, below 1x may help slow GPUs")));
+       }
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Anisotropy:")));
                me.TD(me, 1, 2, e = makeXonoticTextSlider_T("gl_texture_anisotropy",
@@ -107,21 +117,27 @@ void XonoticVideoSettingsTab_fill(entity me)
                        _("Brightness of white")));
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gamma:")));
+               if(cvar_type("vid_gl20") & CVAR_TYPEFLAG_ENGINE)
                        setDependent(e, "vid_gl20", 1, 1);
                me.TD(me, 1, 2, e = makeXonoticSlider_T(0.5, 2.0, 0.05, "v_gamma",
                        _("Inverse gamma correction value, a brightness effect that does not affect white or black")));
+               if(cvar_type("vid_gl20") & CVAR_TYPEFLAG_ENGINE)
                        setDependent(e, "vid_gl20", 1, 1);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Contrast boost:")));
+               if(cvar_type("vid_gl20") & CVAR_TYPEFLAG_ENGINE)
                        setDependent(e, "vid_gl20", 1, 1);
                me.TD(me, 1, 2, e = makeXonoticSlider_T(1.0, 5.0, 0.1, "v_contrastboost",
                        _("By how much to multiply the contrast in dark areas")));
+               if(cvar_type("vid_gl20") & CVAR_TYPEFLAG_ENGINE)
                        setDependent(e, "vid_gl20", 1, 1);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Saturation:")));
+               if(cvar_type("vid_gl20") & CVAR_TYPEFLAG_ENGINE)
                        setDependent(e, "vid_gl20", 1, 1);
                me.TD(me, 1, 2, e = makeXonoticSlider_T(0.5, 2.0, 0.05, "r_glsl_saturation",
                        _("Saturation adjustment (0 = grayscale, 1 = normal, 2 = oversaturated), requires GLSL color control")));
+               if(cvar_type("vid_gl20") & CVAR_TYPEFLAG_ENGINE)
                        setDependent(e, "vid_gl20", 1, 1);
        me.TR(me);
        me.TR(me);
@@ -149,9 +165,11 @@ void XonoticVideoSettingsTab_fill(entity me)
                                _("Poor man's left handed mode")));
                me.TR(me);
                        me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "v_psycho", _("Psycho coloring (easter egg)")));
+                       if(cvar_type("vid_gl20") & CVAR_TYPEFLAG_ENGINE)
                                setDependent(e, "vid_gl20", 1, 1);
                me.TR(me);
                        me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "r_trippy", _("Trippy vertices (easter egg)")));
+                       if(cvar_type("vid_gl20") & CVAR_TYPEFLAG_ENGINE)
                                setDependent(e, "vid_gl20", 1, 1);
        }
 
index 4bba9af32fee6d556f374e7a74eaed1c288df6a8..5d3025517967e4392d1ce4b37ae289ea9cdef710 100644 (file)
@@ -324,7 +324,6 @@ seta cl_casings_sloppy 1 "sloppy casings, may temporarily penetrate walls"
 seta cl_projectiles_sloppy 1 "sloppy projectiles, may temporarily penetrate walls"
 cl_stainmaps 0
 cl_particles_smoke 1
-set vid_gl20 1
 gl_vbo 1 // removed in GL32 renderer
 r_glsl_deluxemapping 1
 r_glsl_offsetmapping 0