Skip to main content
gamedev.net
🔒 Locked

ID3DXBaseEffect::SetArrayRange

Started by sbroumley Dec 3, 2005 at 4:42 PM 0 replies 1.4k views
Original Post
sbroumley
sbroumley
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
sbroumley
sbroumley
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.