PDA

View Full Version : glColor* is not working!



urban debugger
10-14-2002, 02:49 PM
is there anyone who knows why glColor* do not want to color things?

nexusone
10-14-2002, 03:06 PM
Have you enabled gl lighting?
Or enabled gl Matrial?

These two options will effect how the glColor works.

If you enable lighting and not gl Matrial, you get a gray scale effect.



Originally posted by urban debugger:
is there anyone who knows why glColor* do not want to color things?



[This message has been edited by nexusone (edited 10-14-2002).]

*Aaron*
10-14-2002, 03:42 PM
<sarcasm>
Well, since you haven't described your problem or posted any code, I know exactly how to solve it.
</sarcasm>


Try calling glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );
glEnable( GL_COLOR_MATERIAL );
after initializeing OpenGL.

urban debugger
10-14-2002, 04:19 PM
thanks a lot that solved all of my problems.