Archived

This topic is now archived and is closed to further replies.

"Unsetting" material?

This topic is 5896 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Another silly question from the newbie master (me). I would like to "unset" a material, which would be to simply disable the current material and not change to another. for example, I would want one object to be glowing (emissive to something really high), but then I don''t want the others to light up, so I tried SetMaterial(NULL) and SetMaterial(0); which worked on unsetting textures. Is there a method to do this for materials? I know I could simply create a material that would have no special parameters, but Im assuming that by using materials, you are adding calculations, and that I don''t want to do unnecessary calcualtions

Share this post


Link to post
Share on other sites
Materials are simply part of the lighting pipeline - just turn off lighting (D3DRS_LIGHTING) and the materials will no longer have an effect.
[If you want some form of realtime lighting you still need a valid material]

--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites