From 3771dca972eb467de9eac339101ff1f229c3985d Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Wed, 6 Apr 2022 17:04:58 +1000 Subject: [PATCH] menu: video settings: add support for GL32 renderer (DP master) It uses viewscale for antialiasing, instead of vid_samples --- qcsrc/menu/xonotic/dialog_settings_video.qc | 18 ++++++++++++++++++ xonotic-client.cfg | 1 - 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/qcsrc/menu/xonotic/dialog_settings_video.qc b/qcsrc/menu/xonotic/dialog_settings_video.qc index 0ece0271c..39d952826 100644 --- a/qcsrc/menu/xonotic/dialog_settings_video.qc +++ b/qcsrc/menu/xonotic/dialog_settings_video.qc @@ -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); } diff --git a/xonotic-client.cfg b/xonotic-client.cfg index 4bba9af32..5d3025517 100644 --- a/xonotic-client.cfg +++ b/xonotic-client.cfg @@ -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 -- 2.39.2