Exemplo n.º 1
0
/*
** VID_MenuInit
*/
void VID_MenuInit( void )
{
	static const char *yesno_names[] =
	{
		"no",
		"yes",
		0
	};
	static const char *refs[] =
	{
		"[software      ]",
		"[default OpenGL]",
		"[3Dfx OpenGL   ]",
		"[PowerVR OpenGL]",
//		"[Rendition OpenGL]",
		0
	};
	static const char *resolutions[] = 
	{
#include "../qcommon/vid_resolutions.h"
	};
	static const char *refreshrate_names[] = 
	{
		"[default]",
		"[60Hz   ]",
		"[70Hz   ]",
		"[72Hz   ]",
		"[75Hz   ]",
		"[85Hz   ]",
		"[100Hz  ]",
		"[110Hz  ]",
		"[120Hz  ]",
		"[150Hz  ]",
		0
	};
	static const char *filter_names[] =
	{
		"bilinear",
		"trilinear",
		0
	};

	int		i;
	float	temp;

	if ( !gl_driver )
		gl_driver = Cvar_Get( "gl_driver", "opengl32", 0 );
//	if ( !gl_picmip )
//		gl_picmip = Cvar_Get( "gl_picmip", "0", 0 );
//	if ( !gl_mode )
//		gl_mode = Cvar_Get( "gl_mode", "3", 0 );
//	if ( !sw_mode )
//		sw_mode = Cvar_Get( "sw_mode", "3", 0 );
//	if ( !gl_ext_palettedtexture )
//		gl_ext_palettedtexture = Cvar_Get( "gl_ext_palettedtexture", "1", CVAR_ARCHIVE );
//	if ( !gl_swapinterval )
//		gl_swapinterval = Cvar_Get( "gl_swapinterval", "0", CVAR_ARCHIVE );
//	if ( !sw_stipplealpha )
//		sw_stipplealpha = Cvar_Get( "sw_stipplealpha", "0", CVAR_ARCHIVE );

	temp = Cvar_VariableValue("sw_mode");
	s_mode_list[SOFTWARE_MENU].curvalue = (temp == -1) ? 0 : max(temp - 2, 1);	// Knightmare- use offset of 2 because of hidden modes
	temp = Cvar_VariableValue("gl_mode");
	s_mode_list[OPENGL_MENU].curvalue = (temp == -1) ? 0 : max(temp - 2, 1);	// Knightmare- use offset of 2 because of hidden modes

	if ( !scr_viewsize )
		scr_viewsize = Cvar_Get ("viewsize", "100", CVAR_ARCHIVE);

	s_screensize_slider[SOFTWARE_MENU].curvalue = Cvar_VariableValue("viewsize")/10;
	s_screensize_slider[OPENGL_MENU].curvalue = Cvar_VariableValue("viewsize")/10;

	if ( strcmp( Cvar_VariableString("vid_ref"), "soft" ) == 0 )
	{
		s_current_menu_index = SOFTWARE_MENU;
		s_ref_list[0].curvalue = s_ref_list[1].curvalue = REF_SOFT;
	}
	else if ( strcmp( Cvar_VariableString("vid_ref"), "gl" ) == 0 )
	{
		s_current_menu_index = OPENGL_MENU;
		if ( strcmp( Cvar_VariableString("gl_driver"), "3dfxgl" ) == 0 )
			s_ref_list[s_current_menu_index].curvalue = REF_3DFX;
		else if ( strcmp( Cvar_VariableString("gl_driver"), "pvrgl" ) == 0 )
			s_ref_list[s_current_menu_index].curvalue = REF_POWERVR;
		else if ( strcmp( Cvar_VariableString("gl_driver"), "opengl32" ) == 0 )
			s_ref_list[s_current_menu_index].curvalue = REF_OPENGL;
		else
//			s_ref_list[s_current_menu_index].curvalue = REF_VERITE;
			s_ref_list[s_current_menu_index].curvalue = REF_OPENGL;
	}

	s_software_menu.x = viddef.width * 0.50;
	s_software_menu.y = viddef.height * 0.50 - 58;
	s_software_menu.nitems = 0;
	s_opengl_menu.x = viddef.width * 0.50;
	s_opengl_menu.y = viddef.height * 0.50 - 58;
	s_opengl_menu.nitems = 0;

	for ( i = 0; i < 2; i++ )
	{
		s_ref_list[i].generic.type		= MTYPE_SPINCONTROL;
		s_ref_list[i].generic.name		= "graphics renderer";
		s_ref_list[i].generic.x			= 0;
		s_ref_list[i].generic.y			= 0;
		s_ref_list[i].generic.callback	= RefreshCallback;
		s_ref_list[i].itemnames			= refs;
		s_ref_list[i].generic.statusbar	= "changes video refresh";

		s_mode_list[i].generic.type			= MTYPE_SPINCONTROL;
		s_mode_list[i].generic.name			= "video mode";
		s_mode_list[i].generic.x			= 0;
		s_mode_list[i].generic.y			= 10;
		s_mode_list[i].itemnames			= resolutions;
		s_mode_list[i].generic.statusbar	= "changes screen resolution";

		s_fs_box[i].generic.type		= MTYPE_SPINCONTROL;
		s_fs_box[i].generic.x			= 0;
		s_fs_box[i].generic.y			= 20;
		s_fs_box[i].generic.name		= "fullscreen";
		s_fs_box[i].itemnames			= yesno_names;
		s_fs_box[i].curvalue			= Cvar_VariableValue("vid_fullscreen");
		s_fs_box[i].generic.statusbar	= "changes bettween fullscreen and windowed display";

		s_screensize_slider[i].generic.type		= MTYPE_SLIDER;
		s_screensize_slider[i].generic.x		= 0;
		s_screensize_slider[i].generic.y		= 30;
		s_screensize_slider[i].generic.name		= "screen size";
		s_screensize_slider[i].minvalue			= 3;
		s_screensize_slider[i].maxvalue			= 10;
		s_screensize_slider[i].generic.callback	= ScreenSizeCallback;
		s_screensize_slider[i].generic.statusbar = "changes visible screen size";

		s_brightness_slider[i].generic.type			= MTYPE_SLIDER;
		s_brightness_slider[i].generic.x			= 0;
		s_brightness_slider[i].generic.y			= 40;
		s_brightness_slider[i].generic.name			= "brightness";
		s_brightness_slider[i].generic.callback		= BrightnessCallback;
		s_brightness_slider[i].minvalue				= 0;	// 5
		s_brightness_slider[i].maxvalue				= 20;	// 13
	//	s_brightness_slider[i].curvalue				= (1.3 - Cvar_VariableValue("vid_gamma") + 0.5) * 10;
		s_brightness_slider[i].curvalue				= (1.3 - Cvar_VariableValue("vid_gamma")) * 20;
		s_brightness_slider[i].generic.statusbar	= "changes display brightness";

		s_defaults_action[i].generic.type		= MTYPE_ACTION;
		s_defaults_action[i].generic.name		= "reset to defaults";
		s_defaults_action[i].generic.x			= 0;
		s_defaults_action[i].generic.y			= 140;
		s_defaults_action[i].generic.callback	= ResetDefaults;
		s_defaults_action[i].generic.statusbar	= "resets all video settings to internal defaults";

		s_apply_action[i].generic.type		= MTYPE_ACTION;
		s_apply_action[i].generic.name		= "apply changes";
		s_apply_action[i].generic.x			= 0;
		s_apply_action[i].generic.y			= 150;
		s_apply_action[i].generic.callback	= ApplyChanges;
	}

	s_stipple_box.generic.type	= MTYPE_SPINCONTROL;
	s_stipple_box.generic.x		= 0;
	s_stipple_box.generic.y		= 60;
	s_stipple_box.generic.name	= "stipple alpha";
	s_stipple_box.curvalue		= Cvar_VariableValue("sw_stipplealpha");
	s_stipple_box.itemnames		= yesno_names;
	s_stipple_box.generic.statusbar	= "enables stipple drawing of trans surfaces";

	s_tq_slider.generic.type			= MTYPE_SLIDER;
	s_tq_slider.generic.x				= 0;
	s_tq_slider.generic.y				= 60;
	s_tq_slider.generic.name			= "texture quality";
	s_tq_slider.minvalue				= 0;
	s_tq_slider.maxvalue				= 3;
	s_tq_slider.curvalue				= 3-Cvar_VariableValue("gl_picmip");
	s_tq_slider.generic.statusbar		= "changes detail level of textures";

	s_paletted_texture_box.generic.type			= MTYPE_SPINCONTROL;
	s_paletted_texture_box.generic.x			= 0;
	s_paletted_texture_box.generic.y			= 70;
	s_paletted_texture_box.generic.name			= "8-bit textures";
	s_paletted_texture_box.itemnames			= yesno_names;
	s_paletted_texture_box.curvalue				= Cvar_VariableValue("gl_ext_palettedtexture");
	s_paletted_texture_box.generic.statusbar	= "enables rendering of textures in 8-bit form";

	// Knightmare- non-power-of-2 texture option
	s_npot_mipmap_box.generic.type		= MTYPE_SPINCONTROL;
	s_npot_mipmap_box.generic.x			= 0;
	s_npot_mipmap_box.generic.y			= 80;
	s_npot_mipmap_box.generic.name		= "non-power-of-2 mipmaps";
	s_npot_mipmap_box.itemnames			= yesno_names;
	s_npot_mipmap_box.curvalue			= Cvar_VariableValue("gl_nonpoweroftwo_mipmaps");
	s_npot_mipmap_box.generic.statusbar	= "enables non-power-of-2 mipmapped textures (requires driver support)";

	s_texfilter_box.generic.type		= MTYPE_SPINCONTROL;
	s_texfilter_box.generic.x			= 0;
	s_texfilter_box.generic.y			= 90;
	s_texfilter_box.generic.name		= "texture filter";
	s_texfilter_box.curvalue			= texfilter_box_setval();
	s_texfilter_box.itemnames			= filter_names;
	s_texfilter_box.generic.statusbar	= "changes texture filtering mode";
	s_texfilter_box.generic.callback	= TexFilterCallback;

	s_aniso_box.generic.type		= MTYPE_SPINCONTROL;
	s_aniso_box.generic.x			= 0;
	s_aniso_box.generic.y			= 100;
	s_aniso_box.generic.name		= "anisotropic filter";
	s_aniso_box.curvalue			= GetAnisoCurValue();
	s_aniso_box.itemnames			= GetAnisoNames();
	s_aniso_box.generic.statusbar	= "changes level of anisotropic mipmap filtering";
	s_aniso_box.generic.callback	= AnisoCallback;

	s_vsync_box.generic.type		= MTYPE_SPINCONTROL;
	s_vsync_box.generic.x			= 0;
	s_vsync_box.generic.y			= 110;
	s_vsync_box.generic.name		= "video sync";
	s_vsync_box.curvalue			= Cvar_VariableValue("gl_swapinterval");
	s_vsync_box.itemnames			= yesno_names;
	s_vsync_box.generic.statusbar	= "sync framerate with monitor refresh";
	s_vsync_box.generic.callback	= VSyncCallback;

	// Knightmare- refresh rate option
	s_refresh_box.generic.type			= MTYPE_SPINCONTROL;
	s_refresh_box.generic.x				= 0;
	s_refresh_box.generic.y				= 120;
	s_refresh_box.generic.name			= "refresh rate";
	s_refresh_box.curvalue				= refresh_box_setval();
	s_refresh_box.itemnames				= refreshrate_names;
	s_refresh_box.generic.statusbar		= "sets refresh rate for fullscreen modes";

	Menu_AddItem( &s_software_menu, ( void * ) &s_ref_list[SOFTWARE_MENU] );
	Menu_AddItem( &s_software_menu, ( void * ) &s_mode_list[SOFTWARE_MENU] );
	Menu_AddItem( &s_software_menu, ( void * ) &s_fs_box[SOFTWARE_MENU] );
	Menu_AddItem( &s_software_menu, ( void * ) &s_screensize_slider[SOFTWARE_MENU] );
	Menu_AddItem( &s_software_menu, ( void * ) &s_brightness_slider[SOFTWARE_MENU] );
	Menu_AddItem( &s_software_menu, ( void * ) &s_stipple_box );

	Menu_AddItem( &s_opengl_menu, ( void * ) &s_ref_list[OPENGL_MENU] );
	Menu_AddItem( &s_opengl_menu, ( void * ) &s_mode_list[OPENGL_MENU] );
	Menu_AddItem( &s_opengl_menu, ( void * ) &s_fs_box[OPENGL_MENU] );
	Menu_AddItem( &s_opengl_menu, ( void * ) &s_screensize_slider[OPENGL_MENU] );
	Menu_AddItem( &s_opengl_menu, ( void * ) &s_brightness_slider[OPENGL_MENU] );
	Menu_AddItem( &s_opengl_menu, ( void * ) &s_tq_slider );
	Menu_AddItem( &s_opengl_menu, ( void * ) &s_paletted_texture_box );
	Menu_AddItem( &s_opengl_menu, ( void * ) &s_npot_mipmap_box );	// Knightmare- non-power-of-2 texture option
	Menu_AddItem( &s_opengl_menu, ( void * ) &s_texfilter_box );
	Menu_AddItem( &s_opengl_menu, ( void * ) &s_aniso_box );
	Menu_AddItem( &s_opengl_menu, ( void * ) &s_vsync_box );
	Menu_AddItem( &s_opengl_menu, ( void * ) &s_refresh_box );

	Menu_AddItem( &s_software_menu, ( void * ) &s_defaults_action[SOFTWARE_MENU] );
	Menu_AddItem( &s_software_menu, ( void * ) &s_apply_action[SOFTWARE_MENU] );
	Menu_AddItem( &s_opengl_menu, ( void * ) &s_defaults_action[OPENGL_MENU] );
	Menu_AddItem( &s_opengl_menu, ( void * ) &s_apply_action[OPENGL_MENU] );

//	Menu_Center( &s_software_menu );
//	Menu_Center( &s_opengl_menu );
//	s_opengl_menu.x -= 8;
//	s_software_menu.x -= 8;
}
Exemplo n.º 2
0
/*
================
Menu_Video_Init
================
*/
void Menu_Video_Init (void)
{
	// Knightmare- added 1280x1024, 1400x1050, 856x480, 1024x480 modes, removed 320x240, 400x300, 512x384 modes
	static const char *resolutions[] = 
	{
		"[640x480  ]",
		"[800x600  ]",
		"[1024x768 ]",
		"[1280x960 ]",
		"[1280x1024]", // Knightmare added
		"[1600x1200]",
		"[1280x720 ]", // Knightmare added
		"[1280x768 ]", // Knightmare added
		"[1280x800 ]", // Knightmare added
		"[1360x768 ]", // Knightmare added
		"[1366x768 ]", // Knightmare added
		"[1440x900 ]", // Knightmare added
		"[1600x900 ]", // Knightmare added
		"[1680x1050]", // Knightmare added
		"[1920x1080]", // Knightmare added
		"[1920x1200]", // Knightmare added
		"[2560x1440]", // Knightmare added
		"[2560x1600]", // Knightmare added
		"[custom   ]",
		0
	};

	static const char *refreshrate_names[] = 
	{
		"[default]",
		"[60Hz   ]",
		"[70Hz   ]",
		"[72Hz   ]",
		"[75Hz   ]",
		"[85Hz   ]",
		"[100Hz  ]",
		"[110Hz  ]",
		"[120Hz  ]",
		"[150Hz  ]",
		0
	};
	static const char *yesno_names[] =
	{
		"no",
		"yes",
		0
	};
	static const char *sync_names[] =
	{
		"no",
		"vsync",
		"late frame",
		0
	};
	static const char *mip_names[] =
	{
		"bilinear",
		"trilinear",
		0
	};
	static const char *lmh_names[] =
	{
		"low",
		"medium",
		"high",
		"highest",
		0
	};

	static const char *vsync_names[] =
	{
		"no",
		"yes",
		"adaptive",
		0
	};


	static const char *antialias_names[] =
	{
		"off",
		"4x SSAA",
		"FXAA",
		"FXAA FSS",
		0
	};

	static const char *compression_names[] =
	{
		"off",
		"low quality",
		"high quality",
		0
	};


	int32_t		y = 0;
	float	temp;

	int32_t i;
//	int32_t j = sizeof(vid_modes) / sizeof(vidmode_t);
	for (i = 0; i < NUM_VIDEO_MODES; i++)
	{
		if (vid_modes[i].width == Cvar_VariableInteger("vid_width") 
			&& vid_modes[i].height == Cvar_VariableInteger("vid_height") )
			break;
	}
	temp = i;

	if ( !con_font_size )
		con_font_size = Cvar_Get ("con_font_size", "8", CVAR_ARCHIVE);

	s_video_menu.x = SCREEN_WIDTH*0.5;
//	s_video_menu.x = viddef.width * 0.50;
	s_video_menu.y = SCREEN_HEIGHT*0.5 - 80;
	s_video_menu.nitems = 0;

	s_mode_list.generic.type		= MTYPE_SPINCONTROL;
	s_mode_list.generic.name		= "video mode";
	s_mode_list.generic.x			= 0;
	s_mode_list.generic.y			= y;
	s_mode_list.itemnames			= resolutions;




	s_mode_list.curvalue			= temp; // offset for getting rid of < 640x480 resolutions
	s_mode_list.generic.statusbar	= "changes screen resolution";
	
	if (glConfig.ext_framebuffer_object)
	{
		s_antialias_box.generic.type		= MTYPE_SPINCONTROL;
		s_antialias_box.generic.x			= 0;
		s_antialias_box.generic.y			= y += MENU_LINE_SIZE;
		s_antialias_box.generic.name		= "anti-aliasing";
		s_antialias_box.generic.callback	= AntialiasCallback;
		s_antialias_box.curvalue			= Cvar_VariableInteger("r_antialias");
		s_antialias_box.itemnames			= antialias_names;
		s_antialias_box.generic.statusbar	= "selects a software post-processing antialiasing technique";
	}


	s_fs_box.generic.type			= MTYPE_SPINCONTROL;
	s_fs_box.generic.x				= 0;
	s_fs_box.generic.y				= y += MENU_LINE_SIZE;
	s_fs_box.generic.name			= "fullscreen";
	s_fs_box.itemnames				= yesno_names;
	s_fs_box.curvalue				= Cvar_VariableValue("vid_fullscreen");
	s_fs_box.generic.statusbar		= "changes bettween fullscreen and windowed display";

	s_brightness_slider.generic.type		= MTYPE_SLIDER;
	s_brightness_slider.generic.x			= 0;
	s_brightness_slider.generic.y			= y += 2 * MENU_LINE_SIZE;
	s_brightness_slider.generic.name		= "brightness";
	s_brightness_slider.generic.callback	= BrightnessCallback;
	s_brightness_slider.minvalue			= 0;
	s_brightness_slider.maxvalue			= 20;
	s_brightness_slider.curvalue			= Cvar_VariableValue("vid_brightness") * 20.0f;
	s_brightness_slider.generic.statusbar	= "changes display brightness";

	s_texfilter_box.generic.type		= MTYPE_SPINCONTROL;
	s_texfilter_box.generic.x			= 0;
	s_texfilter_box.generic.y			= y += 2*MENU_LINE_SIZE;
	s_texfilter_box.generic.name		= "texture filter";
	s_texfilter_box.curvalue			= texfilter_box_setval();
	s_texfilter_box.itemnames			= mip_names;
	s_texfilter_box.generic.statusbar	= "changes texture filtering mode";

	s_aniso_box.generic.type		= MTYPE_SPINCONTROL;
	s_aniso_box.generic.x			= 0;
	s_aniso_box.generic.y			= y += MENU_LINE_SIZE;
	s_aniso_box.generic.name		= "anisotropic filter";
	s_aniso_box.curvalue			= GetAnisoCurValue();
	s_aniso_box.itemnames			= GetAnisoNames();
	s_aniso_box.generic.statusbar	= "changes level of anisotropic mipmap filtering";

	s_texqual_box.generic.type		= MTYPE_SPINCONTROL;
	s_texqual_box.generic.x			= 0;
	s_texqual_box.generic.y			= y += MENU_LINE_SIZE;
	s_texqual_box.generic.name		= "texture quality";
	s_texqual_box.curvalue			= ClampCvar (0, 3, 3-Cvar_VariableValue("r_picmip"));
	s_texqual_box.itemnames			= lmh_names;
	s_texqual_box.generic.statusbar	= "changes maximum texture size (highest = no limit)";

	if (glConfig.ext_texture_compression_s3tc || glConfig.arb_texture_compression_bptc)
	{
		s_texcompress_box.generic.type		= MTYPE_SPINCONTROL;
		s_texcompress_box.generic.x			= 0;
		s_texcompress_box.generic.y			= y += MENU_LINE_SIZE;
		s_texcompress_box.generic.name		= "texture compression";
		s_texcompress_box.itemnames			= compression_names;
		s_texcompress_box.curvalue			= ClampCvar(0,2,Cvar_VariableValue("r_texturecompression"));
		s_texcompress_box.generic.statusbar	= "enables texture compression";
	}

	s_vsync_box.generic.type			= MTYPE_SPINCONTROL;
	s_vsync_box.generic.x				= 0;
	s_vsync_box.generic.y				= y += 2*MENU_LINE_SIZE;
	s_vsync_box.generic.name			= "video sync";
	s_vsync_box.generic.callback		= VsyncCallback;

	if (glConfig.ext_swap_control_tear)
	{
		int32_t temp = !!Cvar_VariableInteger("r_swapinterval");
		temp += temp ? !!Cvar_VariableInteger("r_adaptivevsync") : 0;
		s_vsync_box.curvalue			= temp;
		s_vsync_box.itemnames			= vsync_names;
	} else {
		s_vsync_box.curvalue			= !!Cvar_VariableValue("r_swapinterval");
		s_vsync_box.itemnames			= yesno_names;
	}
	s_vsync_box.generic.statusbar		= "sync framerate with monitor refresh";

	if (glConfig.arb_sync)
	{
		s_fencesync_box.generic.type			= MTYPE_SPINCONTROL;
		s_fencesync_box.generic.x				= 0;
		s_fencesync_box.generic.y				= y += MENU_LINE_SIZE;
		s_fencesync_box.generic.name			= "gpu frame pacing";
		s_fencesync_box.generic.callback		= FenceSyncCallback;
		s_fencesync_box.curvalue				= ClampCvar(0,2, abs(Cvar_VariableInteger("r_fencesync")));
		s_fencesync_box.itemnames				= sync_names;
		s_fencesync_box.generic.statusbar		= "forces the gpu to synchronize after monitor refresh";
	}
	// Knightmare- refresh rate option
	s_refresh_box.generic.type			= MTYPE_SPINCONTROL;
	s_refresh_box.generic.x				= 0;
	s_refresh_box.generic.y				= y += MENU_LINE_SIZE;
	s_refresh_box.generic.name			= "refresh rate";
	s_refresh_box.curvalue				= refresh_box_setval();
	s_refresh_box.itemnames				= refreshrate_names;
	s_refresh_box.generic.statusbar		= "sets refresh rate for fullscreen modes";

	
	s_advanced_action.generic.type		= MTYPE_ACTION;
	s_advanced_action.generic.name		= "advanced options";
	s_advanced_action.generic.x			= 0;
	s_advanced_action.generic.y			= y += 3*MENU_LINE_SIZE;
	s_advanced_action.generic.callback	= AdvancedOptions;

	s_defaults_action.generic.type		= MTYPE_ACTION;
	s_defaults_action.generic.name		= "reset to defaults";
	s_defaults_action.generic.x			= 0;
	s_defaults_action.generic.y			= y += 3*MENU_LINE_SIZE;
	s_defaults_action.generic.callback	= ResetVideoDefaults;
	s_defaults_action.generic.statusbar	= "resets all video settings to internal defaults";

	// changed cancel to apply changes, thanx to MrG
	s_apply_action.generic.type			= MTYPE_ACTION;
	s_apply_action.generic.name			= "apply changes";
	s_apply_action.generic.x			= 0;
	s_apply_action.generic.y			= y += 2*MENU_LINE_SIZE;
	s_apply_action.generic.callback		= ApplyChanges;

	s_backmain_action.generic.type		= MTYPE_ACTION;
	s_backmain_action.generic.name		= "back to main";
	s_backmain_action.generic.x			= 0;
	s_backmain_action.generic.y			= y += 2*MENU_LINE_SIZE;
	s_backmain_action.generic.callback	= UI_BackMenu;

	Menu_AddItem( &s_video_menu, ( void * ) &s_mode_list );
	if (glConfig.ext_framebuffer_object)
		Menu_AddItem( &s_video_menu, ( void * ) &s_antialias_box );

	Menu_AddItem( &s_video_menu, ( void * ) &s_fs_box );
	Menu_AddItem( &s_video_menu, ( void * ) &s_brightness_slider );
	Menu_AddItem( &s_video_menu, ( void * ) &s_texfilter_box );
	Menu_AddItem( &s_video_menu, ( void * ) &s_aniso_box );
	Menu_AddItem( &s_video_menu, ( void * ) &s_texqual_box );

//	Menu_AddItem( &s_video_menu, ( void * ) &s_npot_mipmap_box );
	
	if (glConfig.ext_texture_compression_s3tc)
		Menu_AddItem( &s_video_menu, ( void * ) &s_texcompress_box );
	Menu_AddItem( &s_video_menu, ( void * ) &s_vsync_box );

	if (glConfig.arb_sync)
		Menu_AddItem( &s_video_menu, ( void * ) &s_fencesync_box );

	Menu_AddItem( &s_video_menu, ( void * ) &s_refresh_box );

	Menu_AddItem( &s_video_menu, ( void * ) &s_advanced_action );
	Menu_AddItem( &s_video_menu, ( void * ) &s_defaults_action );
	Menu_AddItem( &s_video_menu, ( void * ) &s_apply_action );
	Menu_AddItem( &s_video_menu, ( void * ) &s_backmain_action );

//	Menu_Center( &s_video_menu );
//	s_video_menu.x -= MENU_FONT_SIZE;
}