# 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 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.