conworlds
diff src/game.cc @ 11:5dc4e2b8f6f5
LibOVR is broken
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 23 Aug 2014 00:24:20 +0300 |
parents | c2eecf764daa |
children | 778ed91cb7fd |
line diff
1.1 --- a/src/game.cc Fri Aug 22 20:11:15 2014 +0300 1.2 +++ b/src/game.cc Sat Aug 23 00:24:20 2014 +0300 1.3 @@ -87,7 +87,6 @@ 1.4 void game_render() 1.5 { 1.6 glBindFramebuffer(GL_FRAMEBUFFER, fbo); 1.7 - glClearColor(1, 0, 0, 1); 1.8 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 1.9 1.10 glViewport(0, 0, rtwidth / 2.0, rtheight); 1.11 @@ -116,18 +115,18 @@ 1.12 1.13 glMatrixMode(GL_PROJECTION); 1.14 glLoadIdentity(); 1.15 - //if(eye == 0 || !vr_proj_matrix(eye < 0 ? 0 : 1, 0.5, 500.0, mat)) { 1.16 + if(eye == 0 || !vr_proj_matrix(eye < 0 ? 0 : 1, 0.5, 500.0, mat)) { 1.17 gluPerspective(60.0, (float)fb_width / (float)fb_height, 0.5, 500.0); 1.18 - /*} else { 1.19 + } else { 1.20 glLoadMatrixf(mat); 1.21 - }*/ 1.22 + } 1.23 1.24 glMatrixMode(GL_MODELVIEW); 1.25 - //if(eye == 0 || !vr_view_matrix(eye < 0 ? 0 : 1, mat)) { 1.26 + if(eye == 0 || !vr_view_matrix(eye < 0 ? 0 : 1, mat)) { 1.27 glLoadIdentity(); 1.28 - /*} else { 1.29 - glLoadTransposeMatrixf(mat); 1.30 - }*/ 1.31 + } else { 1.32 + glLoadMatrixf(mat); 1.33 + } 1.34 glMultTransposeMatrixf(view_matrix[0]); 1.35 1.36 draw_scene();