istereo

diff src/istereo.c @ 32:bc6db80aaa58

stop the texture coordinates from growing to rediculous proportions
author John Tsiombikas <nuclear@mutantstargoat.com>
date Thu, 08 Sep 2011 21:22:44 +0300
parents 8dd271942543
children 33e9eedad390
line diff
     1.1 --- a/src/istereo.c	Thu Sep 08 15:06:40 2011 +0300
     1.2 +++ b/src/istereo.c	Thu Sep 08 21:22:44 2011 +0300
     1.3 @@ -100,7 +100,6 @@
     1.4  		glClearColor(0.6, 0.6, 0.6, 1.0);
     1.5  		tunnel_speed = 0.75;
     1.6  	}
     1.7 -	glClearDepthf(1.0);
     1.8  	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
     1.9  
    1.10  	if(stereo) {
    1.11 @@ -198,7 +197,7 @@
    1.12  
    1.13  	gl_matrix_mode(GL_TEXTURE);
    1.14  	gl_load_identity();
    1.15 -	gl_translatef(0, -t * tunnel_speed, 0);
    1.16 +	gl_translatef(0, -fmod(t * tunnel_speed, 1.0), 0);
    1.17  
    1.18  	gl_begin(GL_QUADS);
    1.19  	gl_color3f(1.0, 1.0, 1.0);