istereo

changeset 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 3d933b796ad2
children 33e9eedad390
files src/config.h src/istereo.c
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/src/config.h	Thu Sep 08 15:06:40 2011 +0300
     1.2 +++ b/src/config.h	Thu Sep 08 21:22:44 2011 +0300
     1.3 @@ -3,6 +3,8 @@
     1.4  
     1.5  #if defined(__IPHONE_3_0) || defined(__IPHONE_3_2) || defined(__IPHONE_4_0)
     1.6  #define IPHONE
     1.7 +
     1.8 +#define glClearDepth	glClearDepthf
     1.9  #endif
    1.10  
    1.11  #endif	/* CONFIG_H_ */
     2.1 --- a/src/istereo.c	Thu Sep 08 15:06:40 2011 +0300
     2.2 +++ b/src/istereo.c	Thu Sep 08 21:22:44 2011 +0300
     2.3 @@ -100,7 +100,6 @@
     2.4  		glClearColor(0.6, 0.6, 0.6, 1.0);
     2.5  		tunnel_speed = 0.75;
     2.6  	}
     2.7 -	glClearDepthf(1.0);
     2.8  	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
     2.9  
    2.10  	if(stereo) {
    2.11 @@ -198,7 +197,7 @@
    2.12  
    2.13  	gl_matrix_mode(GL_TEXTURE);
    2.14  	gl_load_identity();
    2.15 -	gl_translatef(0, -t * tunnel_speed, 0);
    2.16 +	gl_translatef(0, -fmod(t * tunnel_speed, 1.0), 0);
    2.17  
    2.18  	gl_begin(GL_QUADS);
    2.19  	gl_color3f(1.0, 1.0, 1.0);