Skip to main content
gamedev.net
🔒 Locked

reset materials

Started by FreJa Dec 8, 2008 at 3:50 PM 0 replies 500+ views
Original Post
FreJa
FreJa
Hi, Is there a way to reset to the default material values after applying some material to an object? So it doesn't affect other objects that are drawn after? Thanks!
"Through me the road to the city of desolation,Through me the road to sorrows diuturnal,Through me the road among the lost creation."
swiftcoder
swiftcoder
glPushAttrib(GL_LIGHTING_BIT) and glPopAttrib(), but beware that they save and restore a lot more state than just the material settings. You are probably better off lookin up in the man pages what the default material state is, and then setting it yourself when you need it.
Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.