Jump to content
  • Advertisement
Sign in to follow this  
roel

[.net] [XNA] Accessing arrays of structs in effects

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

Hi there, I made some neat .fx file with a definition of a structure and a declaration of an array of that structure. To my disappointment, it appears to me that the Effect class doesn't allow me to access it, is that correct? There is a field "StructureMembers", to access the fields of a structure, and there are SetValue(..) overloads to set arrays of known types (Matrix, Vector3, etc), but I wasn't able to find any way to do the combination: an array of a certain struct. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
I found my answer by reading some microsoft example program. Maybe someone can use this in the future: the answer is the .Elements property. I could swear I checked all class members before placing my question here, but the XNA documentation sometimes really lacks information.

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!