aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-06-10 09:00:31 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-06-10 09:00:31 +0000
commit2cfa18871081b43f5fd8f1f52010ba2fc6c36054 (patch)
tree83fa3e7830f5af8436931f5f62d139e1de55a976
parentce1263c5f7792d03099b18fb91eb6cf4528c705d (diff)
downloadioquake3-aero-2cfa18871081b43f5fd8f1f52010ba2fc6c36054.tar.gz
ioquake3-aero-2cfa18871081b43f5fd8f1f52010ba2fc6c36054.zip
minor code cleanup
git-svn-id: svn://svn.icculus.org/quake3/trunk@1570 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r--code/renderer/tr_main.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/code/renderer/tr_main.c b/code/renderer/tr_main.c
index 11d52be..e90ec33 100644
--- a/code/renderer/tr_main.c
+++ b/code/renderer/tr_main.c
@@ -513,22 +513,19 @@ R_SetupProjection
void R_SetupProjection(viewParms_t *dest, float zProj, qboolean computeFrustum)
{
float xmin, xmax, ymin, ymax;
- float width, height, stereoSep = r_stereoSeparation->value;
+ float width, height, stereoSep;
/*
* offset the view origin of the viewer for stereo rendering
* by setting the projection matrix appropriately.
*/
- if(stereoSep != 0)
- {
- if(dest->stereoFrame == STEREO_LEFT)
- stereoSep = zProj / r_stereoSeparation->value;
- else if(dest->stereoFrame == STEREO_RIGHT)
- stereoSep = zProj / -r_stereoSeparation->value;
- else
- stereoSep = 0;
- }
+ if(dest->stereoFrame == STEREO_LEFT)
+ stereoSep = zProj / r_stereoSeparation->value;
+ else if(dest->stereoFrame == STEREO_RIGHT)
+ stereoSep = zProj / -r_stereoSeparation->value;
+ else
+ stereoSep = 0;
ymax = zProj * tan(dest->fovY * M_PI / 360.0f);
ymin = -ymax;