🎉 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!

lesson05 and diffuse light

Started by
1 comment, last by insanet 17 years, 7 months ago
so how can i render one of the object with diffuse light and the other without that, till now if i add glEnable(GL_LIGHT0),glEnable(GL_LIGHTING),glEnable(GL_COLOR_MATERIAL) to InitGL, i affect everything, so how would i go if i only want to affect the cube or the pyramid.
Advertisement
Move the glEnable(GL_LIGHTING) to just before the code that draws the object to be affected, and then put a glDisable(GL_LIGHTING) just after.
great, it worked, thx for the reply =)

This topic is closed to new replies.

Advertisement