changing color while rotating

Hi,

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.

Tony

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…

Hi,

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.

Tony

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.