PDA

View Full Version : Graying of colours when lighting switched on



03-27-2002, 03:55 AM
I'm trying to plot colour contours on a 3d model. It works fine with lighting off but with lighting on, all the colours turn to shaded gray. What do I need to do?

mikael_aronsson
03-27-2002, 04:43 AM
Hi !

It's difficult to say, but one guess is that you try to use glColor() to set the color with lights enabled, glColor does not work with lights enabled, you must set the material colors, could that be the problem ?

Mikael

nexusone
03-27-2002, 05:04 AM
Try adding glEnable(GL_COLOR_MATERIAL).



Originally posted by gardi000:
I'm trying to plot colour contours on a 3d model. It works fine with lighting off but with lighting on, all the colours turn to shaded gray. What do I need to do?