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.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/renderer/tr_init.c b/src/renderer/tr_init.c
index f90b8026..ce2b8642 100644
--- a/src/renderer/tr_init.c
+++ b/src/renderer/tr_init.c
@@ -99,6 +99,7 @@ cvar_t *r_depthbits;
cvar_t *r_colorbits;
cvar_t *r_primitives;
cvar_t *r_texturebits;
+cvar_t *r_ext_multisample;
cvar_t *r_drawBuffer;
cvar_t *r_lightmap;
@@ -388,7 +389,7 @@ void RB_TakeScreenshot( int x, int y, int width, int height, char *fileName ) {
}
// gamma correct
- if ( ( tr.overbrightBits > 0 ) && glConfig.deviceSupportsGamma ) {
+ if ( glConfig.deviceSupportsGamma ) {
R_GammaCorrect( buffer + 18, glConfig.vidWidth * glConfig.vidHeight * 3 );
}
@@ -410,7 +411,7 @@ void RB_TakeScreenshotJPEG( int x, int y, int width, int height, char *fileName
qglReadPixels( x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer );
// gamma correct
- if ( ( tr.overbrightBits > 0 ) && glConfig.deviceSupportsGamma ) {
+ if ( glConfig.deviceSupportsGamma ) {
R_GammaCorrect( buffer, glConfig.vidWidth * glConfig.vidHeight * 4 );
}
@@ -530,7 +531,7 @@ void R_LevelShot( void ) {
float xScale, yScale;
int xx, yy;
- sprintf( checkname, "levelshots/%s.tga", tr.world->baseName );
+ Com_sprintf(checkname, sizeof(checkname), "levelshots/%s.tga", tr.world->baseName);
source = ri.Hunk_AllocateTempMemory( glConfig.vidWidth * glConfig.vidHeight * 3 );
@@ -565,7 +566,7 @@ void R_LevelShot( void ) {
}
// gamma correct
- if ( ( tr.overbrightBits > 0 ) && glConfig.deviceSupportsGamma ) {
+ if ( glConfig.deviceSupportsGamma ) {
R_GammaCorrect( buffer + 18, 128 * 128 * 3 );
}
@@ -714,7 +715,7 @@ const void *RB_TakeVideoFrameCmd( const void *data )
GL_UNSIGNED_BYTE, cmd->captureBuffer );
// gamma correct
- if( ( tr.overbrightBits > 0 ) && glConfig.deviceSupportsGamma )
+ if( glConfig.deviceSupportsGamma )
R_GammaCorrect( cmd->captureBuffer, cmd->width * cmd->height * 4 );
if( cmd->motionJpeg )
@@ -913,6 +914,8 @@ void R_Register( void )
r_colorbits = ri.Cvar_Get( "r_colorbits", "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_ext_multisample = ri.Cvar_Get( "r_ext_multisample", "0", CVAR_ARCHIVE | CVAR_LATCH );
+ ri.Cvar_CheckRange( r_ext_multisample, 0, 4, qtrue );
r_overBrightBits = ri.Cvar_Get ("r_overBrightBits", "1", CVAR_ARCHIVE | CVAR_LATCH );
r_ignorehwgamma = ri.Cvar_Get( "r_ignorehwgamma", "0", CVAR_ARCHIVE | CVAR_LATCH);
r_fullscreen = ri.Cvar_Get( "r_fullscreen", "1", CVAR_ARCHIVE );