I'm having problems using textures in OpenGL. Basically what happens is I'm trying to draw one textured quad, and the whole rest should not be textured but just colored. According to Ginto's explanation last evening, I use this code (actually not quite, I filled in the variables for better reading), after entering GL_QUADS, for the textured and the following, had-better-not-be-textured quad:
Code: Select all
// Textured quad
glBindTexture( GL_TEXTURE_2D, texture );
glTexCoord2f( 0.0f, 1.0f );
glVertex3f( -1.0f, -1.0f, -1.1f );
glTexCoord2f( 0.0f, 0.0f );
glVertex3f( -1.0f, 1.0f, -1.1f );
glTexCoord2f( 1.0f, 0.0f );
glVertex3f( 1.0f, 1.0f, -1.1f );
glTexCoord2f( 1.0f, 1.0f );
glVertex3f( 1.0f, -1.0f, -1.1f );
glBindTexture( GL_TEXTURE_2D, 0 );
// Untextured one
glColor4ub( 200, 200, 200, 255 );
glVertex3f( 1.0f, -1.0f, -1.1f );
glVertex3f( 1.0f, 1.0f, -1.1f );
glVertex3f( 1.0f, 1.0f, -1.0f );
glVertex3f( 1.0f, -1.0f, -1.0f );