Advertisement

Help with texture mapping

Started by November 19, 2002 01:23 AM
1 comment, last by xxh6951 22 years, 3 months ago
I am working on an OpenGL project using Visual C++. I need to glue a texture to only one of the polygons, but the problem I am having is I can''t disable texture mapping. If I use texture mapping for one polygon, all the coloring and lighting for other polygons are lost, all I get is some strange color look similar to the last pixel in the texture object. Tried disable GL_TEXTURE_2D and delete texture object. Didn''t work. Please help, thank you very much!!!!!!!!!!!
you need to set the color back to white.

glEnable(GL_TEXTURES_2D);
glBindTexture(GL_TEXTURE_2D, texture);
glPushMatrix();
glBegin(GL_QUADS);
glTex......... glVert....
glTex......... glVert....
glTex......... glVert....
glTex......... glVert....
glEnd();
glPopMatrix();

glDisable(GL_TEXTURES_2D);
glColor3f(1.0f,1.0f,1.0f);
glPushMatrix();
glBegin(GL_QUADS);
glVert....
glVert....
glVert....
glVert....
glEnd();
glPopMatrix();
Advertisement
tylerbinham, I tried what said and it worked!!!!!!!!!
Thanks a lot,;-))

This topic is closed to new replies.

Advertisement