Archived

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

NeViL tHe dEVil

Dynamic Lights

Recommended Posts

How can you make Dynamic Lights? The only Lights I''ve seen are the static ones initialized with the rest of GL (NeHe Tut 7) ------------------------------------------------------ Regret Nothing - Learn Everything

Share this post


Link to post
Share on other sites
Thx, but I just realized I need something more (or less?):
I don't want to cast light on all objects, only on one. How do I do this? Do I just call glLightfv after Drawing all objects except that one, or what?
EDIT: or do I just leave out the Normals on the Objects wich aren't to be Lighted?

------------------------------------------------------
Regret Nothing - Learn Everything

[edited by - NeViL tHe dEVil on January 18, 2004 12:59:10 PM]

Share this post


Link to post
Share on other sites
Tree Penguin    262
Leaving out the normals does not affect lighting, the last given normal being used for all vertices being drawn, only a new glNormalx call overrides it. To disable en enable light for only one object call glEnable(GL_LIGHTING) before and glDisable(GL_LIGHTING) after you draw the object.

Share this post


Link to post
Share on other sites