Sign in to follow this  


Recommended Posts

Does anyone have experience with the function "ID3DXBaseEffect::SetArrayRange"? It doesn't seem to work and the only google info I've found is on the MSDN site. I'm using it do try and upload a chunk of matrices into the middle of my vertex shader matrix array. thanks Steve.

Share this post

Link to post
Share on other sites
I actually got it working. The MSDN documentation is very sparse, but I figured it out through trial and error:

Basically you still need to use the "SetMatrixArray" function with the count parameter set to your full array size, but before that call, you use the "SetArrayRange" function to specify which elements of the array will actually be updated.

// Set which elements to update
pSkinEffect->SetArrayRange ( m_hSkinMatrixArray, m_iSkinStartMatrix, m_iSkinEndMatrix );

// Send range of matrices to shader (size of full array is 48 items)
pSkinEffect->SetMatrixArray( m_hSkinMatrixArray, (D3DXMATRIX*)m_SkinMatrixCache, 48 );


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