mixing glBindTexture and glColor3f

I need some clarification here.
Example:
init()
{
glEnable(GL_TEXTURE_2D);

other stuff…
}

display()
{
glPushMatrix();

glTranslatef(…);

glBindTexture2D(…);
draw_box();

glBindTexture2D(…);
draw_box2();

glColor3f(1.0,0.0,0.0);
draw_box3();

glPopMatrix();

glutSwapBuffers();
}
How come draw_box3() isn’t drawn red?
How come texturing is turned off and everything in scene is red?
Should I use glDeleteTexture(s) or glDisable(GL_TEXTURE_2D)?

yep to draw colored you need to call glDisable(GL_TEXTURE_2D)

It is important to note that once you have called glColor then everything you render after that will be that colour. Just because you set the color to red at the end of your rendering function doesn’t mean that only box3 will be red. The first time you run it the other boxes will be coloured with the defualt white, butafter that since red is the color still in the state machine all boxes will be red.

oops didn’t notice the sentence about everything being drawn red. Yep Tim is right once a color is set to a specific color it will stay that way untill it is changed.