• Advertisement
Sign in to follow this  

Lighting and Texturing

This topic is 4446 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm stumped on this one.. I've finally added texturing to one of my objects, but the lighting no longer effects it! This is what I have glBegin(GL_QUADS); glNormal3f(0, 1, 0); float dcolor[] = { 0.0f, 1.0f, 0.0f, 1.0f }; glMaterialfv(GL_FRONT, GL_DIFFUSE, dcolor); glTexCoord2f(0.0, 0.0); glVertex3f(5, 0, 8); glTexCoord2f(0.0, 3.0); glVertex3f(5, 0, -4); glTexCoord2f(2.5, 3.0); glVertex3f(-5, 0,-4); glTexCoord2f(2.5, 0.0); glVertex3f(-5, 0, 8); glEnd(); The reflected diffuse color doesn't seem to do anything, however, without the texturing it works fine.. Anyone know what might be happening?

Share this post


Link to post
Share on other sites
Advertisement
Set the texture environment mode to GL_MODULATE instead of GL_REPLACE, assuming that it is GL_REPLACE right now. If not post your texturing set up code.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement