Jump to content
  • Advertisement
Sign in to follow this  
Schnozzinkobenstein

DX10: GetVariableByName with Arrays

This topic is 2972 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:
GetVariableByName("gLight");


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

EDIT:

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->SetRawValue(&lights[0],0,sizeof(Light)*NUM_LIGHTS);
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
Advertisement
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!