09/01/09 23:47:58
質問させていただきます。
サンプルのスキンメッシュと、こちらのサイトを参考にアニメーションの勉強をさせていただいているのですが
URLリンク(www.shader.jp)
こちらのサイトのコードを見て実行してみたところ、F5でHLSLに切り替えようとしましたら
// setup the material of the mesh subset - REMEMBER to use the original pre-skinning attribute id to get the correct material id
m_pd3dDevice->SetTexture( 0, pMeshContainer->ppTextures[pBoneComb[iAttrib].AttribId] );
// Set CurNumBones to select the correct vertex shader for the number of bones
m_pEffect->SetInt( "CurNumBones", pMeshContainer->NumInfl -1);
// Start the effect now all parameters have been updated
UINT numPasses;
hr = m_pEffect->Begin( &numPasses, D3DXFX_DONOTSAVESTATE );
for( UINT iPass = 0; iPass < numPasses; iPass++ )
{
hr = m_pEffect->BeginPass( iPass );
// draw the subset with the current world matrix palette and material state
pMeshContainer->MeshData.pMesh->DrawSubset( iAttrib );
}
このあたりで、どうも挙動がおかしくなりHLSLでの描画ができない状態です。。
何が原因かわかる方はいないでしょうか・・