vkQuake2 doxygen  1.0 dev
vid_menu.c File Reference
#include "../client/client.h"
#include "../client/qmenu.h"

Go to the source code of this file.

Macros

#define REF_SOFT   0
 
#define REF_OPENGL   1
 
#define REF_VULKAN   2
 
#define REF_3DFX   3
 
#define REF_POWERVR   4
 
#define REF_VERITE   5
 
#define SOFTWARE_MENU   0
 
#define OPENGL_MENU   1
 
#define VULKAN_MENU   2
 

Functions

void M_ForceMenuOff (void)
 
static void DriverCallback (void *unused)
 
static void ScreenSizeCallback (void *s)
 
static void BrightnessCallback (void *s)
 
static void ResetDefaults (void *unused)
 
static void ApplyChanges (void *unused)
 
static void CancelChanges (void *unused)
 
void VID_MenuInit (void)
 
void VID_MenuDraw (void)
 
const char * VID_MenuKey (int key)
 

Variables

cvar_tvid_ref
 
cvar_tvid_fullscreen
 
cvar_tvid_gamma
 
cvar_tvid_hudscale
 
cvar_tscr_viewsize
 
static cvar_tgl_mode
 
static cvar_tgl_driver
 
static cvar_tgl_picmip
 
static cvar_tgl_ext_palettedtexture
 
static cvar_tgl_finish
 
static cvar_tvk_finish
 
static cvar_tvk_msaa
 
static cvar_tvk_aniso
 
static cvar_tvk_sampleshading
 
static cvar_tvk_texturemode
 
static cvar_tvk_lmaptexturemode
 
static cvar_tvk_vsync
 
static cvar_tvk_postprocess
 
static cvar_tvk_picmip
 
static cvar_tsw_mode
 
static cvar_tsw_stipplealpha
 
static cvar_tvk_mode
 
static cvar_tvk_driver
 
static menuframework_s s_software_menu
 
static menuframework_s s_opengl_menu
 
static menuframework_s s_vulkan_menu
 
static menuframework_ss_current_menu
 
static int s_current_menu_index
 
static menulist_s s_mode_list [3]
 
static menulist_s s_ref_list [3]
 
static menuslider_s s_tq_slider
 
static menuslider_s s_tqvk_slider
 
static menuslider_s s_screensize_slider [3]
 
static menuslider_s s_brightness_slider [3]
 
static menulist_s s_fs_box [3]
 
static menulist_s s_stipple_box
 
static menulist_s s_paletted_texture_box
 
static menulist_s s_msaa_mode
 
static menulist_s s_sampleshading
 
static menulist_s s_aniso_filter
 
static menulist_s s_texture_filter
 
static menulist_s s_lmap_texture_filter
 
static menulist_s s_vsync
 
static menulist_s s_postprocess
 
static menulist_s s_finish_box
 
static menulist_s s_vkfinish_box
 
static menuaction_s s_apply_action [3]
 
static menuaction_s s_cancel_action [3]
 
static menuaction_s s_defaults_action [3]
 

Macro Definition Documentation

◆ OPENGL_MENU

#define OPENGL_MENU   1

Definition at line 68 of file vid_menu.c.

◆ REF_3DFX

#define REF_3DFX   3

Definition at line 27 of file vid_menu.c.

◆ REF_OPENGL

#define REF_OPENGL   1

Definition at line 25 of file vid_menu.c.

◆ REF_POWERVR

#define REF_POWERVR   4

Definition at line 28 of file vid_menu.c.

◆ REF_SOFT

#define REF_SOFT   0

Definition at line 24 of file vid_menu.c.

◆ REF_VERITE

#define REF_VERITE   5

Definition at line 29 of file vid_menu.c.

◆ REF_VULKAN

#define REF_VULKAN   2

Definition at line 26 of file vid_menu.c.

◆ SOFTWARE_MENU

#define SOFTWARE_MENU   0

Definition at line 67 of file vid_menu.c.

◆ VULKAN_MENU

#define VULKAN_MENU   2

Definition at line 69 of file vid_menu.c.

Function Documentation

◆ ApplyChanges()

static void ApplyChanges ( void unused)
static

Definition at line 153 of file vid_menu.c.

154 {
155  float gamma;
156  int i;
157 
158  /*
159  ** make values consistent
160  */
161  for ( i = 0; i < 3; i++ )
162  {
166  }
167 
168  /*
169  ** invert sense so greater = brighter, and scale to a range of 0.5 to 1.3
170  */
171  gamma = ( 0.8 - ( s_brightness_slider[s_current_menu_index].curvalue/10.0 - 0.5 ) ) + 0.5;
172 
173  Cvar_SetValue( "vid_gamma", gamma );
174  Cvar_SetValue( "sw_stipplealpha", s_stipple_box.curvalue );
175  Cvar_SetValue( "gl_picmip", 3 - s_tq_slider.curvalue );
176  Cvar_SetValue( "vid_fullscreen", s_fs_box[s_current_menu_index].curvalue );
177  Cvar_SetValue( "gl_ext_palettedtexture", s_paletted_texture_box.curvalue );
178  Cvar_SetValue( "gl_finish", s_finish_box.curvalue );
179  Cvar_SetValue( "vk_finish", s_vkfinish_box.curvalue );
180  Cvar_SetValue( "sw_mode", s_mode_list[SOFTWARE_MENU].curvalue == 0 ? -1 : s_mode_list[SOFTWARE_MENU].curvalue - 1 );
181  Cvar_SetValue( "gl_mode", s_mode_list[OPENGL_MENU].curvalue == 0 ? -1 : s_mode_list[OPENGL_MENU].curvalue - 1 );
182  Cvar_SetValue( "vk_mode", s_mode_list[VULKAN_MENU].curvalue == 0 ? -1 : s_mode_list[VULKAN_MENU].curvalue - 1 );
183  Cvar_SetValue( "vk_msaa", s_msaa_mode.curvalue );
184  Cvar_SetValue( "vk_aniso", s_aniso_filter.curvalue );
185  Cvar_SetValue( "vk_sampleshading", s_sampleshading.curvalue );
186  Cvar_SetValue( "vk_vsync", s_vsync.curvalue );
187  Cvar_SetValue( "vk_postprocess", s_postprocess.curvalue );
188  Cvar_SetValue( "vk_picmip", 3 - s_tqvk_slider.curvalue );
189 
190  switch ( s_texture_filter.curvalue )
191  {
192  case 0:
193  Cvar_Set( "vk_texturemode", "VK_NEAREST" );
194  break;
195  case 1:
196  Cvar_Set( "vk_texturemode", "VK_LINEAR" );
197  break;
198  case 2:
199  Cvar_Set( "vk_texturemode", "VK_MIPMAP_NEAREST" );
200  break;
201  default:
202  Cvar_Set( "vk_texturemode", "VK_MIPMAP_LINEAR" );
203  }
204 
206  {
207  case 0:
208  Cvar_Set( "vk_lmaptexturemode", "VK_NEAREST" );
209  break;
210  case 1:
211  Cvar_Set( "vk_lmaptexturemode", "VK_LINEAR" );
212  break;
213  case 2:
214  Cvar_Set( "vk_lmaptexturemode", "VK_MIPMAP_NEAREST" );
215  break;
216  default:
217  Cvar_Set( "vk_lmaptexturemode", "VK_MIPMAP_LINEAR" );
218  }
219 
220  switch ( s_ref_list[s_current_menu_index].curvalue )
221  {
222  case REF_SOFT:
223  Cvar_Set( "vid_ref", "soft" );
224  break;
225  case REF_OPENGL:
226  Cvar_Set( "vid_ref", "gl" );
227  Cvar_Set( "gl_driver", "opengl32" );
228  break;
229  case REF_VULKAN:
230  Cvar_Set( "vid_ref", "vk" );
231  Cvar_Set( "vk_driver", "vulkan" );
232  break;
233  case REF_3DFX:
234  Cvar_Set( "vid_ref", "gl" );
235  Cvar_Set( "gl_driver", "3dfxgl" );
236  break;
237  case REF_POWERVR:
238  Cvar_Set( "vid_ref", "gl" );
239  Cvar_Set( "gl_driver", "pvrgl" );
240  break;
241  case REF_VERITE:
242  Cvar_Set( "vid_ref", "gl" );
243  Cvar_Set( "gl_driver", "veritegl" );
244  break;
245  }
246 
247  /*
248  ** update appropriate stuff if we're running OpenGL and gamma
249  ** has been modified
250  */
251  if ( stricmp( vid_ref->string, "gl" ) == 0 )
252  {
253  if ( vid_gamma->modified )
254  {
255  vid_ref->modified = true;
256  if ( stricmp( gl_driver->string, "3dfxgl" ) == 0 )
257  {
258  char envbuffer[1024];
259  float g;
260 
261  vid_ref->modified = true;
262 
263  g = 2.00 * ( 0.8 - ( vid_gamma->value - 0.5 ) ) + 1.0F;
264  Com_sprintf( envbuffer, sizeof(envbuffer), "SSTV2_GAMMA=%f", g );
265  putenv( envbuffer );
266  Com_sprintf( envbuffer, sizeof(envbuffer), "SST_GAMMA=%f", g );
267  putenv( envbuffer );
268 
269  vid_gamma->modified = false;
270  }
271  }
272 
273  if ( gl_driver->modified )
274  vid_ref->modified = true;
275  }
276 
277  M_ForceMenuOff();
278 }

Referenced by VID_MenuInit(), and VID_MenuKey().

◆ BrightnessCallback()

static void BrightnessCallback ( void s)
static

Definition at line 130 of file vid_menu.c.

131 {
132  menuslider_s *slider = ( menuslider_s * ) s;
133  int i;
134 
135  for ( i = 0; i < 3; i++ )
136  {
138  }
139 
140  if ( stricmp( vid_ref->string, "soft" ) == 0 )
141  {
142  float gamma = ( 0.8 - ( slider->curvalue/10.0 - 0.5 ) ) + 0.5;
143 
144  Cvar_SetValue( "vid_gamma", gamma );
145  }
146 }

Referenced by VID_MenuInit().

◆ CancelChanges()

static void CancelChanges ( void unused)
static

Definition at line 280 of file vid_menu.c.

281 {
282  extern void M_PopMenu( void );
283 
284  M_PopMenu();
285 }

Referenced by VID_MenuInit(), and VID_MenuKey().

◆ DriverCallback()

static void DriverCallback ( void unused)
static

Definition at line 99 of file vid_menu.c.

100 {
101  int curr_value = s_ref_list[s_current_menu_index].curvalue;
102  s_ref_list[0].curvalue = curr_value;
103  s_ref_list[1].curvalue = curr_value;
104  s_ref_list[2].curvalue = curr_value;
105 
106  if ( s_ref_list[s_current_menu_index].curvalue == 0 )
107  {
110  }
111  else if ( s_ref_list[s_current_menu_index].curvalue == 2 )
112  {
115  }
116  else
117  {
120  }
121 }

Referenced by VID_MenuInit().

◆ M_ForceMenuOff()

void M_ForceMenuOff ( void  )

Definition at line 123 of file menu.c.

124 {
125  m_drawfunc = 0;
126  m_keyfunc = 0;
128  m_menudepth = 0;
129  Key_ClearStates ();
130  Cvar_Set ("paused", "0");
131 }

Referenced by ApplyChanges(), CL_Disconnect(), Con_ToggleChat_f(), and Con_ToggleConsole_f().

◆ ResetDefaults()

static void ResetDefaults ( void unused)
static

Definition at line 148 of file vid_menu.c.

149 {
150  VID_MenuInit();
151 }

Referenced by VID_MenuInit().

◆ ScreenSizeCallback()

static void ScreenSizeCallback ( void s)
static

Definition at line 123 of file vid_menu.c.

124 {
125  menuslider_s *slider = ( menuslider_s * ) s;
126 
127  Cvar_SetValue( "viewsize", slider->curvalue * 10 );
128 }

Referenced by VID_MenuInit().

◆ VID_MenuDraw()

void VID_MenuDraw ( void  )

Definition at line 646 of file vid_menu.c.

647 {
648  int w, h;
649 
650  if ( s_current_menu_index == 0 )
652  else if (s_current_menu_index == 2)
654  else
656 
657  /*
658  ** draw the banner
659  */
660  re.DrawGetPicSize( &w, &h, "m_banner_video" );
661  re.DrawPic( viddef.width / 2 - w / 2, viddef.height /2 - 110 * vid_hudscale->value, "m_banner_video" );
662 
663  /*
664  ** move cursor to a reasonable starting position
665  */
667 
668  /*
669  ** draw the menu
670  */
672 }

Referenced by M_Menu_Video_f().

◆ VID_MenuInit()

void VID_MenuInit ( void  )

Definition at line 290 of file vid_menu.c.

291 {
292  static const char *resolutions[] =
293  {
294  "[custom ]",
295  "[320 240 ]",
296  "[400 300 ]",
297  "[512 384 ]",
298  "[640 480 ]",
299  "[800 600 ]",
300  "[960 720 ]",
301  "[1024 768 ]",
302  "[1152 864 ]",
303  "[1280 960 ]",
304  "[1366 768 ]",
305  "[1600 1200]",
306  "[1920 1080]",
307  "[2048 1536]",
308  "[2560 1440]",
309  "[3840 2160]",
310  0
311  };
312  static const char *refs[] =
313  {
314  "[software ]",
315  "[default OpenGL]",
316  "[Vulkan ]",
317  "[3Dfx OpenGL ]",
318  "[PowerVR OpenGL]",
319 // "[Rendition OpenGL]",
320  0
321  };
322  static const char *yesno_names[] =
323  {
324  "no",
325  "yes",
326  0
327  };
328  static const char *msaa_modes[] =
329  {
330  "no",
331  "x2",
332  "x4",
333  "x8",
334  "x16",
335  0
336  };
337  static const char *filter_modes[] =
338  {
339  "nearest",
340  "linear",
341  "mipmap nearest",
342  "mipmap linear",
343  0
344  };
345  int i;
346 
347  if ( !gl_driver )
348  gl_driver = Cvar_Get( "gl_driver", "opengl32", 0 );
349  if ( !gl_picmip )
350  gl_picmip = Cvar_Get( "gl_picmip", "0", 0 );
351  if ( !gl_mode )
352  gl_mode = Cvar_Get( "gl_mode", "6", 0 );
353  if ( !sw_mode )
354  sw_mode = Cvar_Get( "sw_mode", "0", 0 );
355  if ( !gl_ext_palettedtexture )
356  gl_ext_palettedtexture = Cvar_Get( "gl_ext_palettedtexture", "1", CVAR_ARCHIVE );
357  if ( !gl_finish )
358  gl_finish = Cvar_Get( "gl_finish", "0", CVAR_ARCHIVE );
359  if ( !vk_finish )
360  vk_finish = Cvar_Get( "vk_finish", "0", CVAR_ARCHIVE );
361  if ( !vk_msaa )
362  vk_msaa = Cvar_Get( "vk_msaa", "0", CVAR_ARCHIVE );
363  if ( !vk_aniso )
364  vk_aniso = Cvar_Get( "vk_aniso", "1", CVAR_ARCHIVE );
365  if ( !vk_sampleshading )
366  vk_sampleshading = Cvar_Get( "vk_sampleshading", "1", CVAR_ARCHIVE );
367  if ( !vk_vsync )
368  vk_vsync = Cvar_Get( "vk_vsync", "0", CVAR_ARCHIVE );
369  if ( !vk_postprocess )
370  vk_postprocess = Cvar_Get( "vk_postprocess", "1", CVAR_ARCHIVE );
371  if ( !vk_texturemode )
372  vk_texturemode = Cvar_Get( "vk_texturemode", "VK_MIPMAP_LINEAR", CVAR_ARCHIVE );
373  if ( !vk_lmaptexturemode )
374  vk_lmaptexturemode = Cvar_Get( "vk_lmaptexturemode", "VK_MIPMAP_LINEAR", CVAR_ARCHIVE );
375  if ( !vk_picmip )
376  vk_picmip = Cvar_Get( "vk_picmip", "0", CVAR_ARCHIVE );
377  if ( !sw_stipplealpha )
378  sw_stipplealpha = Cvar_Get( "sw_stipplealpha", "0", CVAR_ARCHIVE );
379 
380  if( !vk_mode )
381  vk_mode = Cvar_Get( "vk_mode", "11", 0 );
382  if( !vk_driver )
383  vk_driver = Cvar_Get( "vk_driver", "vulkan", 0 );
384 
388 
389  if ( !scr_viewsize )
390  scr_viewsize = Cvar_Get ("viewsize", "100", CVAR_ARCHIVE);
391 
395 
396  if ( strcmp( vid_ref->string, "soft" ) == 0 )
397  {
400  }
401  else if ( strcmp(vid_ref->string, "vk") == 0 )
402  {
405  }
406  else if ( strcmp( vid_ref->string, "gl" ) == 0 )
407  {
409  if ( strcmp( gl_driver->string, "3dfxgl" ) == 0 )
411  else if ( strcmp( gl_driver->string, "pvrgl" ) == 0 )
413  else if ( strcmp( gl_driver->string, "opengl32" ) == 0 )
415  else
417  }
418 
419  s_software_menu.x = viddef.width * 0.50;
421  s_opengl_menu.x = viddef.width * 0.50;
422  s_opengl_menu.nitems = 0;
423  s_vulkan_menu.x = viddef.width * 0.50;
424  s_vulkan_menu.nitems = 0;
425 
426  for ( i = 0; i < 3; i++ )
427  {
429  s_ref_list[i].generic.name = "driver";
430  s_ref_list[i].generic.x = 0;
431  s_ref_list[i].generic.y = 0;
433  s_ref_list[i].itemnames = refs;
434 
436  s_mode_list[i].generic.name = "video mode";
437  s_mode_list[i].generic.x = 0;
439  s_mode_list[i].itemnames = resolutions;
440 
444  s_screensize_slider[i].generic.name = "screen size";
448 
452  s_brightness_slider[i].generic.name = "brightness";
456  s_brightness_slider[i].curvalue = ( 1.3 - vid_gamma->value + 0.5 ) * 10;
457 
459  s_fs_box[i].generic.x = 0;
461  s_fs_box[i].generic.name = "fullscreen";
462  s_fs_box[i].itemnames = yesno_names;
464 
466  s_apply_action[i].generic.name = "apply changes";
467  s_apply_action[i].generic.x = 0;
470 
472  s_defaults_action[i].generic.name = "reset to defaults";
476 
478  s_cancel_action[i].generic.name = "cancel";
479  s_cancel_action[i].generic.x = 0;
482  }
483 
485  s_stipple_box.generic.x = 0;
487  s_stipple_box.generic.name = "stipple alpha";
489  s_stipple_box.itemnames = yesno_names;
490 
492  s_tq_slider.generic.x = 0;
494  s_tq_slider.generic.name = "texture quality";
495  s_tq_slider.minvalue = 0;
496  s_tq_slider.maxvalue = 3;
498 
500  s_tqvk_slider.generic.x = 0;
502  s_tqvk_slider.generic.name = "texture quality";
506 
510  s_paletted_texture_box.generic.name = "8-bit textures";
511  s_paletted_texture_box.itemnames = yesno_names;
513 
515  s_msaa_mode.generic.name = "multisampling";
516  s_msaa_mode.generic.x = 0;
518  s_msaa_mode.itemnames = msaa_modes;
520 
522  s_finish_box.generic.x = 0;
524  s_finish_box.generic.name = "sync every frame";
526  s_finish_box.itemnames = yesno_names;
527 
531  s_vkfinish_box.generic.name = "sync every frame";
533  s_vkfinish_box.itemnames = yesno_names;
534 
536  s_sampleshading.generic.name = "sample shading";
539  s_sampleshading.itemnames = yesno_names;
541 
543  s_aniso_filter.generic.name = "anisotropic filtering";
546  s_aniso_filter.itemnames = yesno_names;
547  s_aniso_filter.curvalue = vk_aniso->value > 0 ? 1 : 0;
548 
550  s_texture_filter.generic.name = "texture filtering";
553  s_texture_filter.itemnames = filter_modes;
555  if ( !Q_stricmp( vk_texturemode->string, "VK_LINEAR" ) )
557  if ( !Q_stricmp( vk_texturemode->string, "VK_MIPMAP_NEAREST" ) )
559  if ( !Q_stricmp( vk_texturemode->string, "VK_MIPMAP_LINEAR" ) )
561 
563  s_lmap_texture_filter.generic.name = "lightmap filtering";
566  s_lmap_texture_filter.itemnames = filter_modes;
568  if ( !Q_stricmp(vk_lmaptexturemode->string, "VK_LINEAR") )
570  if ( !Q_stricmp(vk_lmaptexturemode->string, "VK_MIPMAP_NEAREST") )
572  if ( !Q_stricmp(vk_lmaptexturemode->string, "VK_MIPMAP_LINEAR") )
574 
576  s_vsync.generic.name = "vertical sync";
577  s_vsync.generic.x = 0;
579  s_vsync.itemnames = yesno_names;
580  s_vsync.curvalue = vk_vsync->value > 0 ? 1 : 0;
581 
583  s_postprocess.generic.name = "postprocessing";
584  s_postprocess.generic.x = 0;
586  s_postprocess.itemnames = yesno_names;
588 
594  Menu_AddItem( &s_software_menu, ( void * ) &s_stipple_box );
595 
601  Menu_AddItem( &s_opengl_menu, ( void * ) &s_tq_slider );
603  Menu_AddItem( &s_opengl_menu, ( void * ) &s_finish_box );
604 
610  Menu_AddItem( &s_vulkan_menu, ( void * ) &s_tqvk_slider );
611  Menu_AddItem( &s_vulkan_menu, ( void * ) &s_msaa_mode );
612  Menu_AddItem( &s_vulkan_menu, ( void * ) &s_vkfinish_box );
613  Menu_AddItem( &s_vulkan_menu, ( void * ) &s_sampleshading );
614  Menu_AddItem( &s_vulkan_menu, ( void * ) &s_aniso_filter );
617  Menu_AddItem( &s_vulkan_menu, ( void * ) &s_vsync );
618  Menu_AddItem( &s_vulkan_menu, ( void * ) &s_postprocess );
619 
629 
639 }

Referenced by M_Menu_Video_f(), ResetDefaults(), and VID_LoadRefresh().

◆ VID_MenuKey()

const char* VID_MenuKey ( int  key)

Definition at line 679 of file vid_menu.c.

680 {
682  static const char *sound = "misc/menu1.wav";
683 
684  switch ( key )
685  {
686  case K_ESCAPE:
687  CancelChanges( NULL );
688  return NULL;
689  case K_KP_UPARROW:
690  case K_UPARROW:
691  m->cursor--;
692  Menu_AdjustCursor( m, -1 );
693  break;
694  case K_KP_DOWNARROW:
695  case K_DOWNARROW:
696  m->cursor++;
697  Menu_AdjustCursor( m, 1 );
698  break;
699  case K_KP_LEFTARROW:
700  case K_LEFTARROW:
701  Menu_SlideItem( m, -1 );
702  break;
703  case K_KP_RIGHTARROW:
704  case K_RIGHTARROW:
705  Menu_SlideItem( m, 1 );
706  break;
707  case K_KP_ENTER:
708  case K_ENTER:
709  if ( !Menu_SelectItem( m ) )
710  ApplyChanges( NULL );
711  break;
712  }
713 
714  return sound;
715 }

Referenced by M_Menu_Video_f().

Variable Documentation

◆ gl_driver

cvar_t* gl_driver
static

Definition at line 38 of file vid_menu.c.

Referenced by ApplyChanges(), GLimp_InitGL(), and VID_MenuInit().

◆ gl_ext_palettedtexture

cvar_t* gl_ext_palettedtexture
static

◆ gl_finish

cvar_t* gl_finish
static

Definition at line 41 of file vid_menu.c.

Referenced by VID_MenuInit().

◆ gl_mode

cvar_t* gl_mode
static

Definition at line 37 of file vid_menu.c.

Referenced by VID_MenuInit().

◆ gl_picmip

cvar_t* gl_picmip
static

Definition at line 39 of file vid_menu.c.

Referenced by GL_Upload32(), R_SetSky(), and VID_MenuInit().

◆ s_aniso_filter

menulist_s s_aniso_filter
static

Definition at line 88 of file vid_menu.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ s_apply_action

menuaction_s s_apply_action[3]
static

Definition at line 95 of file vid_menu.c.

Referenced by VID_MenuInit().

◆ s_brightness_slider

menuslider_s s_brightness_slider[3]
static

Definition at line 82 of file vid_menu.c.

Referenced by ApplyChanges(), BrightnessCallback(), and VID_MenuInit().

◆ s_cancel_action

menuaction_s s_cancel_action[3]
static

Definition at line 96 of file vid_menu.c.

Referenced by VID_MenuInit().

◆ s_current_menu

menuframework_s* s_current_menu
static

Definition at line 74 of file vid_menu.c.

Referenced by DriverCallback(), VID_MenuDraw(), and VID_MenuKey().

◆ s_current_menu_index

int s_current_menu_index
static

◆ s_defaults_action

menuaction_s s_defaults_action[3]
static

Definition at line 97 of file vid_menu.c.

Referenced by VID_MenuInit().

◆ s_finish_box

menulist_s s_finish_box
static

Definition at line 93 of file vid_menu.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ s_fs_box

menulist_s s_fs_box[3]
static

Definition at line 83 of file vid_menu.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ s_lmap_texture_filter

menulist_s s_lmap_texture_filter
static

Definition at line 90 of file vid_menu.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ s_mode_list

menulist_s s_mode_list[3]
static

Definition at line 77 of file vid_menu.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ s_msaa_mode

menulist_s s_msaa_mode
static

Definition at line 86 of file vid_menu.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ s_opengl_menu

menuframework_s s_opengl_menu
static

Definition at line 72 of file vid_menu.c.

Referenced by DriverCallback(), VID_MenuDraw(), and VID_MenuInit().

◆ s_paletted_texture_box

menulist_s s_paletted_texture_box
static

Definition at line 85 of file vid_menu.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ s_postprocess

menulist_s s_postprocess
static

Definition at line 92 of file vid_menu.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ s_ref_list

menulist_s s_ref_list[3]
static

Definition at line 78 of file vid_menu.c.

Referenced by ApplyChanges(), DriverCallback(), and VID_MenuInit().

◆ s_sampleshading

menulist_s s_sampleshading
static

Definition at line 87 of file vid_menu.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ s_screensize_slider

menuslider_s s_screensize_slider[3]
static

Definition at line 81 of file vid_menu.c.

Referenced by VID_MenuInit().

◆ s_software_menu

menuframework_s s_software_menu
static

Definition at line 71 of file vid_menu.c.

Referenced by DriverCallback(), VID_MenuDraw(), and VID_MenuInit().

◆ s_stipple_box

menulist_s s_stipple_box
static

Definition at line 84 of file vid_menu.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ s_texture_filter

menulist_s s_texture_filter
static

Definition at line 89 of file vid_menu.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ s_tq_slider

menuslider_s s_tq_slider
static

Definition at line 79 of file vid_menu.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ s_tqvk_slider

menuslider_s s_tqvk_slider
static

Definition at line 80 of file vid_menu.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ s_vkfinish_box

menulist_s s_vkfinish_box
static

Definition at line 94 of file vid_menu.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ s_vsync

menulist_s s_vsync
static

Definition at line 91 of file vid_menu.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ s_vulkan_menu

menuframework_s s_vulkan_menu
static

Definition at line 73 of file vid_menu.c.

Referenced by DriverCallback(), VID_MenuDraw(), and VID_MenuInit().

◆ scr_viewsize

cvar_t* scr_viewsize

Definition at line 49 of file cl_scrn.c.

Referenced by VID_MenuInit().

◆ sw_mode

cvar_t* sw_mode
static

Definition at line 52 of file vid_menu.c.

Referenced by DDRAW_Init(), and VID_MenuInit().

◆ sw_stipplealpha

cvar_t* sw_stipplealpha
static

Definition at line 53 of file vid_menu.c.

Referenced by R_ClipAndDrawPoly(), and VID_MenuInit().

◆ vid_fullscreen

cvar_t* vid_fullscreen

Definition at line 47 of file vid_dll.c.

Referenced by VID_MenuInit().

◆ vid_gamma

cvar_t* vid_gamma

Definition at line 43 of file vid_dll.c.

Referenced by ApplyChanges(), and VID_MenuInit().

◆ vid_hudscale

cvar_t* vid_hudscale

Definition at line 48 of file vid_dll.c.

Referenced by VID_MenuDraw(), and VID_MenuInit().

◆ vid_ref

cvar_t* vid_ref

Definition at line 44 of file vid_dll.c.

Referenced by ApplyChanges(), BrightnessCallback(), and VID_MenuInit().

◆ vk_aniso

cvar_t* vk_aniso
static

Definition at line 44 of file vid_menu.c.

Referenced by VID_MenuInit(), Vk_LmapTextureMode(), and Vk_TextureMode().

◆ vk_driver

cvar_t* vk_driver
static

Definition at line 56 of file vid_menu.c.

Referenced by VID_MenuInit().

◆ vk_finish

cvar_t* vk_finish
static

Definition at line 42 of file vid_menu.c.

Referenced by VID_MenuInit().

◆ vk_lmaptexturemode

cvar_t* vk_lmaptexturemode
static

Definition at line 47 of file vid_menu.c.

Referenced by VID_MenuInit().

◆ vk_mode

cvar_t* vk_mode
static

Definition at line 55 of file vid_menu.c.

Referenced by VID_MenuInit().

◆ vk_msaa

cvar_t* vk_msaa
static

Definition at line 43 of file vid_menu.c.

Referenced by VID_MenuInit().

◆ vk_picmip

cvar_t* vk_picmip
static

Definition at line 50 of file vid_menu.c.

Referenced by R_SetSky(), VID_MenuInit(), and Vk_Upload32().

◆ vk_postprocess

cvar_t* vk_postprocess
static

Definition at line 49 of file vid_menu.c.

Referenced by VID_MenuInit().

◆ vk_sampleshading

cvar_t* vk_sampleshading
static

Definition at line 45 of file vid_menu.c.

Referenced by QVk_CreatePipeline(), and VID_MenuInit().

◆ vk_texturemode

cvar_t* vk_texturemode
static

Definition at line 46 of file vid_menu.c.

Referenced by VID_MenuInit().

◆ vk_vsync

cvar_t* vk_vsync
static

Definition at line 48 of file vid_menu.c.

Referenced by QVk_CreateSwapchain(), and VID_MenuInit().

REF_SOFT
#define REF_SOFT
Definition: vid_menu.c:24
K_KP_ENTER
#define K_KP_ENTER
Definition: keys.h:70
s_vulkan_menu
static menuframework_s s_vulkan_menu
Definition: vid_menu.c:73
s_msaa_mode
static menulist_s s_msaa_mode
Definition: vid_menu.c:86
s_screensize_slider
static menuslider_s s_screensize_slider[3]
Definition: vid_menu.c:81
vid_hudscale
cvar_t * vid_hudscale
Definition: vid_dll.c:48
REF_OPENGL
#define REF_OPENGL
Definition: vid_menu.c:25
K_KP_RIGHTARROW
#define K_KP_RIGHTARROW
Definition: keys.h:66
menucommon_s::type
int type
Definition: qmenu.h:66
gl_driver
static cvar_t * gl_driver
Definition: vid_menu.c:38
s_vsync
static menulist_s s_vsync
Definition: vid_menu.c:91
cvar_s::modified
qboolean modified
Definition: q_shared.h:330
_tag_menuframework::y
int y
Definition: qmenu.h:51
menuslider_s::generic
menucommon_s generic
Definition: qmenu.h:95
SOFTWARE_MENU
#define SOFTWARE_MENU
Definition: vid_menu.c:67
s_paletted_texture_box
static menulist_s s_paletted_texture_box
Definition: vid_menu.c:85
cvar_s::string
char * string
Definition: q_shared.h:327
vk_aniso
static cvar_t * vk_aniso
Definition: vid_menu.c:44
K_ENTER
#define K_ENTER
Definition: keys.h:26
i
int i
Definition: q_shared.c:305
scr_viewsize
cvar_t * scr_viewsize
Definition: cl_scrn.c:49
menucommon_s::x
int x
Definition: qmenu.h:68
REF_VERITE
#define REF_VERITE
Definition: vid_menu.c:29
s_mode_list
static menulist_s s_mode_list[3]
Definition: vid_menu.c:77
vid_gamma
cvar_t * vid_gamma
Definition: vid_dll.c:43
menuaction_s::generic
menucommon_s generic
Definition: qmenu.h:115
vk_texturemode
static cvar_t * vk_texturemode
Definition: vid_menu.c:46
Cvar_Get
cvar_t * Cvar_Get(char *var_name, char *var_value, int flags)
Definition: cvar.c:127
s_brightness_slider
static menuslider_s s_brightness_slider[3]
Definition: vid_menu.c:82
Menu_Center
void Menu_Center(menuframework_s *menu)
Definition: qmenu.c:336
menuslider_s::minvalue
float minvalue
Definition: qmenu.h:97
viddef
viddef_t viddef
Definition: vid_dll.c:54
vid_fullscreen
cvar_t * vid_fullscreen
Definition: vid_dll.c:47
m_menudepth
int m_menudepth
Definition: menu.c:79
DriverCallback
static void DriverCallback(void *unused)
Definition: vid_menu.c:99
Menu_Draw
void Menu_Draw(menuframework_s *menu)
Definition: qmenu.c:346
s_vkfinish_box
static menulist_s s_vkfinish_box
Definition: vid_menu.c:94
vk_vsync
static cvar_t * vk_vsync
Definition: vid_menu.c:48
s_defaults_action
static menuaction_s s_defaults_action[3]
Definition: vid_menu.c:97
menucommon_s::y
int y
Definition: qmenu.h:68
viddef_t::width
unsigned width
Definition: vid.h:29
REF_VULKAN
#define REF_VULKAN
Definition: vid_menu.c:26
s_fs_box
static menulist_s s_fs_box[3]
Definition: vid_menu.c:83
vk_lmaptexturemode
static cvar_t * vk_lmaptexturemode
Definition: vid_menu.c:47
s_lmap_texture_filter
static menulist_s s_lmap_texture_filter
Definition: vid_menu.c:90
Menu_SelectItem
qboolean Menu_SelectItem(menuframework_s *s)
Definition: qmenu.c:482
gl_mode
static cvar_t * gl_mode
Definition: vid_menu.c:37
M_PopMenu
void M_PopMenu(void)
Definition: menu.c:133
Menu_AdjustCursor
void Menu_AdjustCursor(menuframework_s *m, int dir)
Definition: qmenu.c:288
menucommon_s::callback
void(* callback)(void *self)
Definition: qmenu.h:76
key_game
@ key_game
Definition: client.h:200
vk_mode
static cvar_t * vk_mode
Definition: vid_menu.c:55
gl_picmip
static cvar_t * gl_picmip
Definition: vid_menu.c:39
s_stipple_box
static menulist_s s_stipple_box
Definition: vid_menu.c:84
K_LEFTARROW
#define K_LEFTARROW
Definition: keys.h:35
menuslider_s::maxvalue
float maxvalue
Definition: qmenu.h:98
CVAR_ARCHIVE
#define CVAR_ARCHIVE
Definition: q_shared.h:316
viddef_t::height
unsigned height
Definition: vid.h:29
_tag_menuframework::cursor
int cursor
Definition: qmenu.h:52
s_tq_slider
static menuslider_s s_tq_slider
Definition: vid_menu.c:79
cvar_s::value
float value
Definition: q_shared.h:331
Cvar_SetValue
void Cvar_SetValue(char *var_name, float value)
Definition: cvar.c:317
VULKAN_MENU
#define VULKAN_MENU
Definition: vid_menu.c:69
s_texture_filter
static menulist_s s_texture_filter
Definition: vid_menu.c:89
m_drawfunc
void(* m_drawfunc)(void)
Definition: menu.c:63
K_DOWNARROW
#define K_DOWNARROW
Definition: keys.h:34
K_KP_UPARROW
#define K_KP_UPARROW
Definition: keys.h:62
NULL
#define NULL
Definition: q_shared.h:67
refexport_t::DrawGetPicSize
void(* DrawGetPicSize)(int *w, int *h, char *name)
Definition: ref.h:166
s_ref_list
static menulist_s s_ref_list[3]
Definition: vid_menu.c:78
s_current_menu_index
static int s_current_menu_index
Definition: vid_menu.c:75
BrightnessCallback
static void BrightnessCallback(void *s)
Definition: vid_menu.c:130
MTYPE_ACTION
#define MTYPE_ACTION
Definition: qmenu.h:27
CancelChanges
static void CancelChanges(void *unused)
Definition: vid_menu.c:280
vk_finish
static cvar_t * vk_finish
Definition: vid_menu.c:42
refexport_t::DrawPic
void(* DrawPic)(int x, int y, char *name)
Definition: ref.h:167
Q_stricmp
int Q_stricmp(char *s1, char *s2)
Definition: q_shared.c:1180
ApplyChanges
static void ApplyChanges(void *unused)
Definition: vid_menu.c:153
_tag_menuframework
Definition: qmenu.h:49
K_RIGHTARROW
#define K_RIGHTARROW
Definition: keys.h:36
_tag_menuframework::nitems
int nitems
Definition: qmenu.h:54
menulist_s::curvalue
int curvalue
Definition: qmenu.h:108
REF_POWERVR
#define REF_POWERVR
Definition: vid_menu.c:28
s
static fixed16_t s
Definition: r_scan.c:30
gl_finish
static cvar_t * gl_finish
Definition: vid_menu.c:41
re
refexport_t re
Definition: vid_dll.c:32
VID_MenuInit
void VID_MenuInit(void)
Definition: vid_menu.c:290
s_finish_box
static menulist_s s_finish_box
Definition: vid_menu.c:93
vk_sampleshading
static cvar_t * vk_sampleshading
Definition: vid_menu.c:45
MTYPE_SLIDER
#define MTYPE_SLIDER
Definition: qmenu.h:25
vk_msaa
static cvar_t * vk_msaa
Definition: vid_menu.c:43
ResetDefaults
static void ResetDefaults(void *unused)
Definition: vid_menu.c:148
s_software_menu
static menuframework_s s_software_menu
Definition: vid_menu.c:71
_tag_menuframework::x
int x
Definition: qmenu.h:51
vk_postprocess
static cvar_t * vk_postprocess
Definition: vid_menu.c:49
menuslider_s::curvalue
float curvalue
Definition: qmenu.h:99
menuslider_s
Definition: qmenu.h:93
s_apply_action
static menuaction_s s_apply_action[3]
Definition: vid_menu.c:95
vk_driver
static cvar_t * vk_driver
Definition: vid_menu.c:56
s_tqvk_slider
static menuslider_s s_tqvk_slider
Definition: vid_menu.c:80
s_opengl_menu
static menuframework_s s_opengl_menu
Definition: vid_menu.c:72
menucommon_s::name
const char * name
Definition: qmenu.h:67
s_postprocess
static menulist_s s_postprocess
Definition: vid_menu.c:92
s_current_menu
static menuframework_s * s_current_menu
Definition: vid_menu.c:74
menulist_s::itemnames
const char ** itemnames
Definition: qmenu.h:110
MTYPE_SPINCONTROL
#define MTYPE_SPINCONTROL
Definition: qmenu.h:28
gl_ext_palettedtexture
static cvar_t * gl_ext_palettedtexture
Definition: vid_menu.c:40
vk_picmip
static cvar_t * vk_picmip
Definition: vid_menu.c:50
s_aniso_filter
static menulist_s s_aniso_filter
Definition: vid_menu.c:88
Menu_SlideItem
void Menu_SlideItem(menuframework_s *s, int dir)
Definition: qmenu.c:511
Cvar_Set
cvar_t * Cvar_Set(char *var_name, char *value)
Definition: cvar.c:278
vid_ref
cvar_t * vid_ref
Definition: vid_dll.c:44
client_static_t::key_dest
keydest_t key_dest
Definition: client.h:205
m_keyfunc
const char *(* m_keyfunc)(int key)
Definition: menu.c:64
K_KP_DOWNARROW
#define K_KP_DOWNARROW
Definition: keys.h:68
K_ESCAPE
#define K_ESCAPE
Definition: keys.h:27
s_sampleshading
static menulist_s s_sampleshading
Definition: vid_menu.c:87
w
GLdouble GLdouble GLdouble w
Definition: qgl_win.c:291
sw_stipplealpha
static cvar_t * sw_stipplealpha
Definition: vid_menu.c:53
OPENGL_MENU
#define OPENGL_MENU
Definition: vid_menu.c:68
cls
client_static_t cls
Definition: cl_main.c:90
REF_3DFX
#define REF_3DFX
Definition: vid_menu.c:27
Key_ClearStates
void Key_ClearStates(void)
Definition: keys.c:935
K_UPARROW
#define K_UPARROW
Definition: keys.h:33
menulist_s::generic
menucommon_s generic
Definition: qmenu.h:106
Menu_AddItem
void Menu_AddItem(menuframework_s *menu, void *item)
Definition: qmenu.c:266
M_ForceMenuOff
void M_ForceMenuOff(void)
Definition: menu.c:123
ScreenSizeCallback
static void ScreenSizeCallback(void *s)
Definition: vid_menu.c:123
Com_sprintf
void Com_sprintf(char *dest, int size, char *fmt,...)
Definition: q_shared.c:1223
K_KP_LEFTARROW
#define K_KP_LEFTARROW
Definition: keys.h:64
s_cancel_action
static menuaction_s s_cancel_action[3]
Definition: vid_menu.c:96
sw_mode
static cvar_t * sw_mode
Definition: vid_menu.c:52