Advertisement

lesson05 and diffuse light

Started by December 02, 2006 03:57 AM
1 comment, last by insanet 17 years, 11 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.
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.
Advertisement
great, it worked, thx for the reply =)

This topic is closed to new replies.

Advertisement