【C++】 DirectX初心者質問スレ Part24 【C】
■ このスレッドは過去ログ倉庫に格納されています
0043デフォルトの名無しさん
2009/06/25(木) 14:35:03サンプルのInstancingなのですが、技法3、定数のインスタンス化の処理はあまり意味ないように思えるのですが
これって効果あるのでしょうか?
for( int nRemainingBoxes = 0; nRemainingBoxes < g_NumBoxes; nRemainingBoxes++ )
{
// set the box Instancing array
V( g_pEffect->SetVector( g_HandleBoxInstance_Position, &g_vBoxInstance_Position[nRemainingBoxes] ) );
V( g_pEffect->SetVector( g_HandleBoxInstance_Color, (D3DXVECTOR4*)&g_vBoxInstance_Color[nRemainingBoxes] ) );
// The effect interface queues up the changes and performs them
// with the CommitChanges call. You do not need to call CommitChanges if
// you are not setting any parameters between the BeginPass and EndPass.
V( g_pEffect->CommitChanges() );
V( pd3dDevice->DrawIndexedPrimitive( D3DPT_TRIANGLELIST, 0, 0, 4 * 6, 0, 6 * 2 ) );
}
■ このスレッドは過去ログ倉庫に格納されています