istereo

changeset 16:20a9d3db38cb

forgot to actually use bind_texture
author John Tsiombikas <nuclear@mutantstargoat.com>
date Wed, 07 Sep 2011 09:19:47 +0300
parents 32503603eb7d
children 4c20f10a7183
files src/istereo.c src/tex.h
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/src/istereo.c	Wed Sep 07 09:17:15 2011 +0300
     1.2 +++ b/src/istereo.c	Wed Sep 07 09:19:47 2011 +0300
     1.3 @@ -47,8 +47,7 @@
     1.4  	gl_load_identity();
     1.5  	gl_translatef(0, 0, -8);
     1.6  
     1.7 -	glEnable(GL_TEXTURE_2D);
     1.8 -	glBindTexture(GL_TEXTURE_2D, tex);
     1.9 +	bind_texture(tex, 0);
    1.10  
    1.11  	gl_begin(GL_QUADS);
    1.12  	gl_texcoord2f(0, 0);
    1.13 @@ -65,7 +64,7 @@
    1.14  	gl_vertex3f(-1, 1, 0);
    1.15  	gl_end();
    1.16  
    1.17 -	glDisable(GL_TEXTURE_2D);
    1.18 +	bind_texture(0, 0);
    1.19  
    1.20  	assert(glGetError() == GL_NO_ERROR);
    1.21  }
     2.1 --- a/src/tex.h	Wed Sep 07 09:17:15 2011 +0300
     2.2 +++ b/src/tex.h	Wed Sep 07 09:19:47 2011 +0300
     2.3 @@ -2,5 +2,6 @@
     2.4  #define TEX_H_
     2.5  
     2.6  unsigned int load_texture(const char *fname);
     2.7 +void bind_texture(unsigned int tex, int unit);
     2.8  
     2.9  #endif	/* TEX_H_ */