problem with GL_COLOR_MATERIAL
i use colored material only for one object and if i draw this object then lighting doesn''t work any more
glDisable(GL_BLEND);
glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
glEnable(GL_COLOR_MATERIAL);
texture.Bind();
glColor3f(0.0f, 0.0f, 1.0f);
glBegin(...);
glTexCoord2f(...); glVertex3f(...);
...
glEnd();
glColor3f(1.0f, 1.0f, 1.0f);
glDisable(GL_COLOR_MATERIAL);
Where does the lighting fails ?
For the object we see in this code, or for objects that are drawn after this code ?
For the object we see in this code, or for objects that are drawn after this code ?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement