Jump to content
  • Advertisement
Sign in to follow this  
sbroumley

ID3DXBaseEffect::SetArrayRange

This topic is 4583 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

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
Advertisement
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 );


-Steve.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!