Archived

This topic is now archived and is closed to further replies.

Lighting = texture?

This topic is 5582 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

Hi guys! I'm trying to make a little application using lighting, and I'm having some troubles. The problem is that i'm not using textures (i don't know if it's a problem). I'm using only colors to paint the objects. I tryed to add a lighing on them, and it didn't work. But there something strange on this... I put some texture on the objects, and it worked! Doesn't lightning work with only colors? or I'm doing something wrong? Thank you! Fernando [edited by - FERNANDO-BRASIL on August 28, 2002 10:43:17 PM]

Share this post


Link to post
Share on other sites
lighting should work on untextured tris, its worked for me before. I gave my light ambience of (0.5, 0.5, 0.5, 1.0) and diffuse of (1.0, 1.0, 1.0, 1.0), and my tris were coloured (0.2, 0.2, 0.2). I did find that if you make the tri too bright, e.g. (1.0, 1.0, 1.0) it doesn''t seem to light, so maybe you''re doing something like that?

Share this post


Link to post
Share on other sites
If you''re using glColor* to setup lighting colors, it won''t work unless you use glColorMaterial. To get greater control over lighting you should learn out to use glMaterial* though.

Share this post


Link to post
Share on other sites