ID3DXBaseEffect::SetArrayRange

Started by
0 comments, last by sbroumley 18 years, 4 months ago
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.
Steve Broumley
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.

Steve Broumley

This topic is closed to new replies.

Advertisement