Jump to content
  • Advertisement
Sign in to follow this  

DX10: GetVariableByName with Arrays

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

I want to seed this variable in my shader file with an array out of my application:
in app:
Light lights[NUM_LIGHTS];

in effect file:
Light gLight[NUM_LIGHTS];

I know that to do so with just one struct would be like this:
in effect file:
Light gLight;

in app:

But I'm not sure what the argument of GetVariableByName needs to be to do it with an array.


I guess I'm also sure how to be doing SetRawValue in tandem with GetVariableByName. This is what I have right now and it doesn't seem to work:
mFXLightVar = mFX->GetVariableByName("gLight");

[Edited by - Schnozzinkobenstein on October 22, 2010 11:30:45 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.

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!