Sign in to follow this  
JoystickX

How to convert ID3DXAnimationSet to ID3DXKeyframedAnimationSet ?

Recommended Posts

If I use QueryInterface than program crashes on calling UnregisterAnimation() with animation index higher than 0



if (SUCCEEDED (pAnimController->GetAnimationSetByName (szAnimSetName, &pAnimSet)))
{
if (SUCCEEDED(pAnimSet->QueryInterface (IID_ID3DXKeyframedAnimationSet, (LPVOID*)&pKeyFramedAnimSet)))
{
UINT dwNumAnimations = pKeyFramedAnimSet->GetNumAnimations ();
for (UINT i=0; i<dwNumAnimations; i++)
HRESULT hr = pKeyFramedAnimSet->UnregisterAnimation (i);
}
pAnimSet->Release ();
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this