diff options
author | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-06-10 10:41:11 +0000 |
---|---|---|
committer | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-06-10 10:41:11 +0000 |
commit | 5e5505114dcb731d8b55e3887b9110c79015aa18 (patch) | |
tree | 0deed74a5424d16a6ca50f8d54aeb505ff848bc6 /code | |
parent | 2cfa18871081b43f5fd8f1f52010ba2fc6c36054 (diff) | |
download | ioquake3-aero-5e5505114dcb731d8b55e3887b9110c79015aa18.tar.gz ioquake3-aero-5e5505114dcb731d8b55e3887b9110c79015aa18.zip |
fix code cleanup
git-svn-id: svn://svn.icculus.org/quake3/trunk@1571 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r-- | code/renderer/tr_main.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/code/renderer/tr_main.c b/code/renderer/tr_main.c index e90ec33..9d4edef 100644 --- a/code/renderer/tr_main.c +++ b/code/renderer/tr_main.c @@ -513,19 +513,22 @@ R_SetupProjection void R_SetupProjection(viewParms_t *dest, float zProj, qboolean computeFrustum) { float xmin, xmax, ymin, ymax; - float width, height, stereoSep; + float width, height, stereoSep = r_stereoSeparation->value; /* * offset the view origin of the viewer for stereo rendering * by setting the projection matrix appropriately. */ - 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(stereoSep != 0) + { + if(dest->stereoFrame == STEREO_LEFT) + stereoSep = zProj / stereoSep; + else if(dest->stereoFrame == STEREO_RIGHT) + stereoSep = zProj / stereoSep; + else + stereoSep = 0; + } ymax = zProj * tan(dest->fovY * M_PI / 360.0f); ymin = -ymax; |