Jump to content
  • Advertisement
Sign in to follow this  

XNA problem

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

Hello, I have this little problem, I've added the EnvironmentMap.FX to my XNA 2.0 project. But I'm having a problem just applying this effect to just one object/peice of my main mesh. See in the sample there is some foreach statements but I just want to apply this effect to one object, does someone have code to do this? I'm really new to XNA and can't seem to find out how to apply a FX file to just one mesh peice:( OH I was checking this code out from msdn.com effect.SetValue(...); effect.SetValue(...); effect.Begin(0); effect.BeginPass(0); mesh.DrawSubset(0); effect.EndPass(); effect.End(); Problem is I don't know how to set the effect variable to my .fx file, I see this BasicEffect effect setting in the foreach loops, seems it sets the effect to basiceffect, must be something like that. Thanks, MajSlayer [Edited by - MajSlayer on June 24, 2008 9:16:54 PM]

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.

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!