diff options
author | Tim Angus <tim@ngus.net> | 2007-03-21 23:55:51 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2007-03-21 23:55:51 +0000 |
commit | d899c25c571ed061bba9725cf7b35d492cc6e518 (patch) | |
tree | 25268c9b3e381d00c2885c1fec7a54f46f56d93b /src/renderer | |
parent | cb5b4648d45b3f078a6ae3da45707764ca46e241 (diff) |
* ioq3-r1052 merge
Diffstat (limited to 'src/renderer')
-rw-r--r-- | src/renderer/tr_init.c | 22 | ||||
-rw-r--r-- | src/renderer/tr_shader.c | 3 |
2 files changed, 13 insertions, 12 deletions
diff --git a/src/renderer/tr_init.c b/src/renderer/tr_init.c index 96fa5b4d..ce966699 100644 --- a/src/renderer/tr_init.c +++ b/src/renderer/tr_init.c @@ -133,7 +133,7 @@ cvar_t *r_fullscreen; cvar_t *r_customwidth; cvar_t *r_customheight; -cvar_t *r_customaspect; +cvar_t *r_customPixelAspect; cvar_t *r_overBrightBits; cvar_t *r_mapOverBrightBits; @@ -395,6 +395,7 @@ static int s_numVidModes = ( sizeof( r_vidModes ) / sizeof( r_vidModes[0] ) ); qboolean R_GetModeInfo( int *width, int *height, float *windowAspect, int mode ) { vidmode_t *vm; + float pixelAspect; if ( mode < -1 ) { return qfalse; @@ -406,17 +407,18 @@ qboolean R_GetModeInfo( int *width, int *height, float *windowAspect, int mode ) if ( mode == -1 ) { *width = r_customwidth->integer; *height = r_customheight->integer; - *windowAspect = r_customaspect->value; - return qtrue; - } + pixelAspect = r_customPixelAspect->value; + } else { + vm = &r_vidModes[mode]; - vm = &r_vidModes[mode]; + *width = vm->width; + *height = vm->height; + pixelAspect = vm->pixelAspect; + } - *width = vm->width; - *height = vm->height; - *windowAspect = (float)vm->width / ( vm->height * vm->pixelAspect ); + *windowAspect = (float)*width / ( *height * pixelAspect ); - return qtrue; + return qtrue; } /* @@ -1024,7 +1026,7 @@ void R_Register( void ) #endif r_customwidth = ri.Cvar_Get( "r_customwidth", "1600", CVAR_ARCHIVE | CVAR_LATCH ); r_customheight = ri.Cvar_Get( "r_customheight", "1024", CVAR_ARCHIVE | CVAR_LATCH ); - r_customaspect = ri.Cvar_Get( "r_customaspect", "1", CVAR_ARCHIVE | CVAR_LATCH ); + r_customPixelAspect = ri.Cvar_Get( "r_customPixelAspect", "1", CVAR_ARCHIVE | CVAR_LATCH ); r_simpleMipMaps = ri.Cvar_Get( "r_simpleMipMaps", "1", CVAR_ARCHIVE | CVAR_LATCH ); r_vertexLight = ri.Cvar_Get( "r_vertexLight", "0", CVAR_ARCHIVE | CVAR_LATCH ); r_uiFullScreen = ri.Cvar_Get( "r_uifullscreen", "0", 0); diff --git a/src/renderer/tr_shader.c b/src/renderer/tr_shader.c index 0e4504ef..10223a5c 100644 --- a/src/renderer/tr_shader.c +++ b/src/renderer/tr_shader.c @@ -2283,9 +2283,8 @@ static shader_t *FinishShader( void ) { shader.numUnfoggedPasses = stage; // fogonly shaders don't have any normal passes - if ( stage == 0 ) { + if (stage == 0 && !shader.isSky) shader.sort = SS_FOG; - } // determine which stage iterator function is appropriate ComputeStageIteratorFunc(); |