Jump to content
  • Advertisement


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


"Unsetting" material?

This topic is 6180 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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!