Jump to content
  • Advertisement
Sign in to follow this  
bangz

HLSL Arrays of Constants

This topic is 4496 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, How would I go about setting an array element constant? What I'd like to do, but this doesn't work...
pVS_->GetConstantTable()->SetFloat( D3DDEVICE, "fArray[0]", 42.0f );

Might be important to point out that I want to do this through the Constant Table and not the D3DXEffect classes. Cheers, Richard.

Share this post


Link to post
Share on other sites
Advertisement
I have done the same whit in an Effect and that worked (but as you sad you did'nt want that). Have you tried to change the float array to a vector array that have worked for me few times when constant maping f**ks up.

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!