Archived

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

Simple lighting :(

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

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
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