jyoung77
05-23-2003, 02:08 PM
Hi,
It seems to me that the following glEnable() only enables GL_SPECULAR, rather than both GL_SPECULAR and GL_AMBIENT_AND_DIFFUSE. Am I right? Besides, if I want to re-enable GL_SPECULAR color material after the glDisable() below, do I have to call glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR) again? Thanks for any advise. Tony
glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR);
glEnable(GL_COLOR_MATERIAL);
glDisable(GL_COLOR_MATERIAL);
It seems to me that the following glEnable() only enables GL_SPECULAR, rather than both GL_SPECULAR and GL_AMBIENT_AND_DIFFUSE. Am I right? Besides, if I want to re-enable GL_SPECULAR color material after the glDisable() below, do I have to call glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR) again? Thanks for any advise. Tony
glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR);
glEnable(GL_COLOR_MATERIAL);
glDisable(GL_COLOR_MATERIAL);