Jump to content
  • Advertisement
Sign in to follow this  

[MDX] How to use mesh's EffectInstances() when rendering

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

Hallo everyone! Now, I know it's not good form to burst straight onto a forum and start begging for help. Erm. Yes. I'm working with MDX to make a little graphics engine, got all the basics working - even got some post-shaders running.. then I hit a brick wall. I was wondering to myself if there was a more elegant way of using shaders on my geometry, and it occured to me that there may be more output from the Mesh.FromFile() method that I hadn't used - sure enough, there's a return for an array of EffectInstances().. and that's as far as I get. An hours blast through the MSDN docs and the web hasn't really given me any clues as to what I do with them to make them render nicely on my loaded geometry. Soo.. - I check for that the effect filename for each member of the effectinstances array is not null. From there I'm stuck, I know that I can create a new material from the returned effectinstance and extended material, but the rest of the implementation escapes me. Not sure what to do with the parameters I get from effectInstances[].GetDefaults() for a start. But assuming I get all this set up correctly, do I just set my material as usual before calling Mesh.DrawSubset? Phew! Thanks for reading this far, any help at all would be gratefully received. EDIT: Please choose a more appropriate subject line in future! See the FAQ for more details... [Edited by - jollyjeffers on May 17, 2007 6:53:14 AM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!