Sign in to follow this  
bangz

HLSL Arrays of Constants

Recommended Posts

bangz    119
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
Xmon    136
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this