View Full Version : changing color while rotating

05-07-2003, 01:14 PM

I have a program (partly written by me) that displays different colors for an object, say a cube, when the object is rotated. The lighting is on, color blending is disabled, and color material is enabled. Do you know why? I want the object always shows the color I specify. Please help. Thanks.


05-07-2003, 05:03 PM
This is sounding like a fairly basic lighting question.

How are you setting up your lighting? (Ambient/Specular/Diffuse)

How are you defining your normals (Are you defining normals?) <- I'm betting this is the problem...

05-08-2003, 10:30 AM

I probablly have to describe the problem more clearly. The object, say a cube, reflects colors perfectly until a translucent plane in the program is enabled (displayed). I can see the translucent plane have two different colors on its two sides. Then my cube's color is identical to the one the translucent plane is showing (depending on which plane side is facing to me).

I don't know what setting is changed when the translucent plane is enabled/disabled. It's written by the 3rd party program. Without the plane, my cube shows correct colors.

Please help. Thanks.


05-08-2003, 12:32 PM
Sounds like it's changing some gl state that is affecting your software.

Try and figure out what the state is that's getting clobbered & restore it before your own rendering code.

glDisable is your friend.