Advertisement

Reset material values to default

Started by November 16, 2004 05:56 PM
4 comments, last by eSCHEn 20 years ago
Is there a way to reset the material values (glMaterialfv()) back to default? If not, does anyone know the default values for each GL_AMBIENT, GL_DIFFUSE, GL_EMISSION, GL_SHININESS and GL_SPECULAR so that I can do it manually? Thanks.
From the Blue Book:

GL_AMBIENT 	 	The default ambient reflectance for both front- and back-facing materials is (0.2, 0.2, 0.2, 1.0).GL_DIFFUSE 	 	The default diffuse reflectance for both front- and back-facing materials is (0.8, 0.8, 0.8, 1.0).GL_SPECULAR 	 	The default specular reflectance for both front- and back-facing materials is (0.0, 0.0, 0.0, 1.0).GL_EMISSION 	 	The default emission intensity for both front- and back-facing materials is (0.0, 0.0, 0.0, 1.0).GL_SHININESS 	 	The default specular exponent for both front- and back-facing materials is 0.


/edit: Cleaned up formatting.

HTH
--
Cheers,
Darren Clark
Advertisement
Thanks.
I would have looked in the Blue Book had I not taken it back to the library a few hours before asking the question. I should probably buy it really.
I have a html version of it and The Red Book, would you like me to e-mail you them (about 8Mb rar'd)?
--
Cheers,
Darren Clark
Thanks for the offer but I've got too much other coursework to do before I'll have time to play around with opengl again and by that time I should be able to afford the books.
No problems mate ;)
--
Cheers,
Darren Clark

This topic is closed to new replies.

Advertisement