summaryrefslogtreecommitdiff
path: root/src/renderer/tr_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer/tr_init.c')
-rw-r--r--src/renderer/tr_init.c45
1 files changed, 16 insertions, 29 deletions
diff --git a/src/renderer/tr_init.c b/src/renderer/tr_init.c
index 426579d7..685f6fa1 100644
--- a/src/renderer/tr_init.c
+++ b/src/renderer/tr_init.c
@@ -47,11 +47,18 @@ cvar_t *r_displayRefresh;
cvar_t *r_detailTextures;
cvar_t *r_znear;
+cvar_t *r_zproj;
+cvar_t *r_stereoSeparation;
cvar_t *r_smp;
cvar_t *r_showSmp;
cvar_t *r_skipBackEnd;
+cvar_t *r_stereoEnabled;
+cvar_t *r_anaglyphMode;
+
+cvar_t *r_greyscale;
+
cvar_t *r_ignorehwgamma;
cvar_t *r_measureOverdraw;
@@ -90,7 +97,6 @@ cvar_t *r_logFile;
cvar_t *r_stencilbits;
cvar_t *r_depthbits;
cvar_t *r_colorbits;
-cvar_t *r_stereo;
cvar_t *r_primitives;
cvar_t *r_texturebits;
@@ -149,30 +155,6 @@ int max_polys;
cvar_t *r_maxpolyverts;
int max_polyverts;
-static void AssertCvarRange( cvar_t *cv, float minVal, float maxVal, qboolean shouldBeIntegral )
-{
- if ( shouldBeIntegral )
- {
- if ( ( int ) cv->value != cv->integer )
- {
- ri.Printf( PRINT_WARNING, "WARNING: cvar '%s' must be integral (%f)\n", cv->name, cv->value );
- ri.Cvar_Set( cv->name, va( "%d", cv->integer ) );
- }
- }
-
- if ( cv->value < minVal )
- {
- ri.Printf( PRINT_WARNING, "WARNING: cvar '%s' out of range (%f < %f)\n", cv->name, cv->value, minVal );
- ri.Cvar_Set( cv->name, va( "%f", minVal ) );
- }
- else if ( cv->value > maxVal )
- {
- ri.Printf( PRINT_WARNING, "WARNING: cvar '%s' out of range (%f > %f)\n", cv->name, cv->value, maxVal );
- ri.Cvar_Set( cv->name, va( "%f", maxVal ) );
- }
-}
-
-
#define GENERIC_HW_R_PICMIP_DEFAULT "0"
#define GENERIC_HW_R_TEXTUREMODE_DEFAULT "GL_LINEAR_MIPMAP_LINEAR"
@@ -925,11 +907,10 @@ void R_Register( void )
r_roundImagesDown = ri.Cvar_Get ("r_roundImagesDown", "1", CVAR_ARCHIVE | CVAR_LATCH );
r_colorMipLevels = ri.Cvar_Get ("r_colorMipLevels", "0", CVAR_LATCH );
- AssertCvarRange( r_picmip, 0, 16, qtrue );
+ ri.Cvar_CheckRange( r_picmip, 0, 16, qtrue );
r_detailTextures = ri.Cvar_Get( "r_detailtextures", "1", CVAR_ARCHIVE | CVAR_LATCH );
r_texturebits = ri.Cvar_Get( "r_texturebits", "0", CVAR_ARCHIVE | CVAR_LATCH );
r_colorbits = ri.Cvar_Get( "r_colorbits", "0", CVAR_ARCHIVE | CVAR_LATCH );
- r_stereo = ri.Cvar_Get( "r_stereo", "0", CVAR_ARCHIVE | CVAR_LATCH );
r_stencilbits = ri.Cvar_Get( "r_stencilbits", "8", CVAR_ARCHIVE | CVAR_LATCH );
r_depthbits = ri.Cvar_Get( "r_depthbits", "0", CVAR_ARCHIVE | CVAR_LATCH );
r_overBrightBits = ri.Cvar_Get ("r_overBrightBits", "1", CVAR_ARCHIVE | CVAR_LATCH );
@@ -943,13 +924,15 @@ void R_Register( void )
r_uiFullScreen = ri.Cvar_Get( "r_uifullscreen", "0", 0);
r_subdivisions = ri.Cvar_Get ("r_subdivisions", "4", CVAR_ARCHIVE | CVAR_LATCH);
r_smp = ri.Cvar_Get( "r_smp", "0", CVAR_ARCHIVE | CVAR_LATCH);
+ r_stereoEnabled = ri.Cvar_Get( "r_stereoEnabled", "0", CVAR_ARCHIVE | CVAR_LATCH);
r_ignoreFastPath = ri.Cvar_Get( "r_ignoreFastPath", "1", CVAR_ARCHIVE | CVAR_LATCH );
+ r_greyscale = ri.Cvar_Get("r_greyscale", "0", CVAR_ARCHIVE | CVAR_LATCH);
//
// temporary latched variables that can only change over a restart
//
r_displayRefresh = ri.Cvar_Get( "r_displayRefresh", "0", CVAR_LATCH );
- AssertCvarRange( r_displayRefresh, 0, 200, qtrue );
+ ri.Cvar_CheckRange( r_displayRefresh, 0, 200, qtrue );
r_fullbright = ri.Cvar_Get ("r_fullbright", "0", CVAR_LATCH|CVAR_CHEAT );
r_mapOverBrightBits = ri.Cvar_Get ("r_mapOverBrightBits", "2", CVAR_LATCH );
r_intensity = ri.Cvar_Get ("r_intensity", "1", CVAR_LATCH );
@@ -962,7 +945,9 @@ void R_Register( void )
r_lodbias = ri.Cvar_Get( "r_lodbias", "0", CVAR_ARCHIVE );
r_flares = ri.Cvar_Get ("r_flares", "0", CVAR_ARCHIVE );
r_znear = ri.Cvar_Get( "r_znear", "1", CVAR_CHEAT );
- AssertCvarRange( r_znear, 0.001f, 200, qtrue );
+ ri.Cvar_CheckRange( r_znear, 0.001f, 200, qfalse );
+ r_zproj = ri.Cvar_Get( "r_zproj", "64", CVAR_ARCHIVE );
+ r_stereoSeparation = ri.Cvar_Get( "r_stereoSeparation", "64", CVAR_ARCHIVE );
r_ignoreGLErrors = ri.Cvar_Get( "r_ignoreGLErrors", "1", CVAR_ARCHIVE );
r_fastsky = ri.Cvar_Get( "r_fastsky", "0", CVAR_ARCHIVE );
r_inGameVideo = ri.Cvar_Get( "r_inGameVideo", "1", CVAR_ARCHIVE );
@@ -986,6 +971,8 @@ void R_Register( void )
r_ambientScale = ri.Cvar_Get( "r_ambientScale", "0.6", CVAR_CHEAT );
r_directedScale = ri.Cvar_Get( "r_directedScale", "1", CVAR_CHEAT );
+ r_anaglyphMode = ri.Cvar_Get("r_anaglyphMode", "0", CVAR_ARCHIVE);
+
//
// temporary variables that can change at any time
//