Archived

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

jubbbird

Simple lighting :(

Recommended Posts

Ive got some cubes on the screen, apparently green. However, when the light is enabled, no matter how low the intensity or botht he light and ambient light, the cubes become grey-scale. Is there any specific reason why this is happening? Im still setting the colour. The only difference is that the one white light is enabled... Thanx

Share this post


Link to post
Share on other sites
Have you correctly set up the light ?

Please post some code.

========================
Leyder Dylan (dylan.leyder@slug-production.be.tf
http://users.skynet.be/fa550206/Slug-Production/Index.htm/

Share this post


Link to post
Share on other sites
Wehn you enable lighting, you need to enable GL_COLOR_MATERIAL, and use glColorMaterial in combination with glColor to set the material properties of the object. Or alternatively, you can just use glMaterial to set the material properties of the object. The default material properties would give you a greyscale object rather than a color object.

J.W.

Share this post


Link to post
Share on other sites
Cheers guys for ur replies, ive had it on hold for a few days, butill soon be back onthe job, so ill try out what uve said, and post again later


Cheers again

Share this post


Link to post
Share on other sites