# HG changeset patch # User John Tsiombikas # Date 1443675823 -10800 # Node ID f4dd01c36b0c4b5aaeb2c6c275aadfc2a62fc184 # Parent 1b7776cb800b79befdbe9afd5b4b62eba46d43d5 fixed inverted left/right stereo pairs diff -r 1b7776cb800b -r f4dd01c36b0c src/glut/main.c --- a/src/glut/main.c Thu Oct 01 07:54:57 2015 +0300 +++ b/src/glut/main.c Thu Oct 01 08:03:43 2015 +0300 @@ -107,3 +107,12 @@ { mouse_motion(x, y); } + +/* dummy ad banner functions */ +void ad_banner_show(void) +{ +} + +void ad_banner_hide(void) +{ +} diff -r 1b7776cb800b -r f4dd01c36b0c src/istereo.c --- a/src/istereo.c Thu Oct 01 07:54:57 2015 +0300 +++ b/src/istereo.c Thu Oct 01 08:03:43 2015 +0300 @@ -155,12 +155,28 @@ if(stereo) { int split_pt = (int)((float)view_xsz * split); - /* right eye */ + /* left eye */ glViewport(0, 0, split_pt, view_ysz); cam_aspect((float)split_pt / (float)view_ysz); gl_matrix_mode(GL_PROJECTION); gl_load_identity(); + cam_stereo_proj_matrix(CAM_LEFT); + //gl_rotatef(-90, 0, 0, 1); + + gl_matrix_mode(GL_MODELVIEW); + gl_load_identity(); + cam_stereo_view_matrix(CAM_LEFT); + gl_translatef(-pan_x, -pan_y, -1.1 * ring_height * segm); + + render(tsec); + + /* right eye */ + glViewport(split_pt, 0, view_xsz - split_pt, view_ysz); + cam_aspect((float)(view_xsz - split_pt) / (float)view_ysz); + + gl_matrix_mode(GL_PROJECTION); + gl_load_identity(); cam_stereo_proj_matrix(CAM_RIGHT); //gl_rotatef(-90, 0, 0, 1); @@ -170,22 +186,6 @@ gl_translatef(-pan_x, -pan_y, -1.1 * ring_height * segm); render(tsec); - - /* left eye */ - glViewport(split_pt, 0, view_xsz - split_pt, view_ysz); - cam_aspect((float)(view_xsz - split_pt) / (float)view_ysz); - - gl_matrix_mode(GL_PROJECTION); - gl_load_identity(); - cam_stereo_proj_matrix(CAM_LEFT); - //gl_rotatef(-90, 0, 0, 1); - - gl_matrix_mode(GL_MODELVIEW); - gl_load_identity(); - cam_stereo_view_matrix(CAM_LEFT); - gl_translatef(-pan_x, -pan_y, -1.1 * ring_height * segm); - - render(tsec); } else { glViewport(0, 0, view_xsz, view_ysz); cam_aspect((float)view_xsz / (float)view_ysz);