Changeset a214f04 in git


Ignore:
Timestamp:
20/02/18 08:55:30 (19 months ago)
Author:
Olly Betts <olly@…>
Branches:
stereo
Children:
2ea6ae5
Parents:
938fee8
Message:

Add a translation for each eye

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gla-gl.cc

    r938fee8 ra214f04  
    785785    // 0.1 for mono?
    786786    Double near_plane = 1.0;
     787    const double APERTURE = 50.0;
     788    const double FOCAL_LEN = 70.0;
     789    const double EYE_SEP = FOCAL_LEN / 20.0;
    787790    if (m_Perspective) {
    788         const double APERTURE = 50.0;
    789         const double FOCAL_LEN = 70.0;
    790         const double EYE_SEP = FOCAL_LEN / 20.0;
    791791        near_plane = FOCAL_LEN / 5.0;
    792792        Double stereo_adj = 0.5 * EYE_SEP * near_plane / FOCAL_LEN;
     
    820820    // Get axes the correct way around (z upwards, y into screen)
    821821    glRotated(-90.0, 1.0, 0.0, 0.0);
     822    CHECK_GL_ERROR("SetDataTransform", "glRotated");
     823    glTranslated(m_Eye ? -0.5 * EYE_SEP : 0.5 * EYE_SEP, 0.0, 0.0);
    822824    CHECK_GL_ERROR("SetDataTransform", "glRotated");
    823825    glRotated(-m_Tilt, 1.0, 0.0, 0.0);
Note: See TracChangeset for help on using the changeset viewer.