🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Why all the objects become white when using glScale?
I'm a new learner who benefits a lot from NeHe's OpenGL Tutorial. However, when I'm trying to "do" something myself, the problem comes... I created four spheres with conditions like bellowing:
glEnable
GL_DEPTH_TEST
GL_LIGHTING(direction light from +Z, one ambient, one diffuse)
GL_COLOR_MATERIAL
ShadeModel GL_SMOOTH
glOrtho
The color of spheres is glColor4f 0.8, 0.3, 0.1, 1.0
I tried rotating, translateing and scaling with my mouse. When I scale, I found all the spheres' color become white when they become small.
If I turn off the light, this problem does not exist any more. But of course, the spheres are only 2D disks now.
Please help me to avoid this problem. Thank you very much!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement