From 91368f6f1bde1840a049f95e03de89e101093910 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 30 Nov 2022 19:28:18 +0000 Subject: [PATCH] updating vulkan renderer sub menu to be a bit more on part with the rest. --- src/client/menu/videomenu.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/client/menu/videomenu.c b/src/client/menu/videomenu.c index 8f689d41..5f2819fb 100644 --- a/src/client/menu/videomenu.c +++ b/src/client/menu/videomenu.c @@ -45,6 +45,7 @@ static cvar_t *gl_anisotropic; static cvar_t *gl_msaa_samples; static cvar_t *gl1_colorlight; static cvar_t *gl3_colorlight; +static cvar_t *vk_dynamic; static menuframework_s s_opengl_menu; @@ -59,8 +60,10 @@ static menuslider_s s_gl3_intensity_slider; static menuslider_s s_vk_intensity_slider; static menuslider_s s_gl1_overbrightbits_slider; static menuslider_s s_gl3_overbrightbits_slider; +static menuslider_s s_vk_overbrightbits_slider; static menulist_s s_gl1_colorlight_list; static menulist_s s_gl3_colorlight_list; +static menulist_s s_vk_dynamic_list; static menulist_s s_fs_box; static menulist_s s_vsync_list; static menulist_s s_af_list; @@ -545,6 +548,22 @@ VID_MenuInit(void) s_vk_intensity_slider.maxvalue = 5; s_vk_intensity_slider.slidestep = 1; s_vk_intensity_slider.printformat = "%.0f"; + + s_vk_overbrightbits_slider.generic.type = MTYPE_SLIDER; + s_vk_overbrightbits_slider.generic.name = "overbrights"; + s_vk_overbrightbits_slider.generic.x = 0; + s_vk_overbrightbits_slider.generic.y = (y += 10); + s_vk_overbrightbits_slider.cvar = "vk_overbrightbits"; + s_vk_overbrightbits_slider.minvalue = 0.1f; + s_vk_overbrightbits_slider.maxvalue = 5.0f; + + vk_dynamic = Cvar_Get("vk_dynamic", "1", CVAR_ARCHIVE); + s_vk_dynamic_list.generic.type = MTYPE_SPINCONTROL; + s_vk_dynamic_list.generic.name = "dynamic light"; + s_vk_dynamic_list.generic.x = 0; + s_vk_dynamic_list.generic.y = (y += 10); + s_vk_dynamic_list.itemnames = yesno_names; + s_vk_dynamic_list.curvalue = (vk_dynamic->value != 0); } else { @@ -680,6 +699,8 @@ VID_MenuInit(void) else if (strcmp(vid_renderer->string, "vk") == 0) { Menu_AddItem(&s_opengl_menu, (void *)&s_vk_intensity_slider); + Menu_AddItem(&s_opengl_menu, (void *)&s_vk_overbrightbits_slider); + Menu_AddItem(&s_opengl_menu, (void *)&s_vk_dynamic_list); } else if (strcmp(vid_renderer->string, "gl1") == 0) {