microsoft/DirectXTK

What arguments I'm missing

dudedude1234 opened this issue · 5 comments

I'm setting up multiple animations for my model to operate through controls

switch (m_ModelAnimation) { default: DX::ThrowIfFailed( m_animation.Load(L"soldier.sdkmesh_anim") ); break; }

yet I keep getting this error saying there's too few arguments for the function call

Are you using AnimationSDKMESH or AnimationCMO when you declare m_animation?

AnimationSDKMESH

Please post a snippet of code that shows the m_animation declaration...

`void Player::CreateDeviceDependentResources()
{

auto device = m_deviceResources->GetD3DDevice();

m_states = std::make_unique<CommonStates>(device);

m_fxFactory = std::make_unique<EffectFactory>(device);

m_model = Model::CreateFromSDKMESH(device, L"soldier.sdkmesh",
    *m_fxFactory,
    ModelLoader_Clockwise | ModelLoader_IncludeBones);


switch (m_ModelAnimation)
{
default:
DX::ThrowIfFailed(
    m_animation.Load(L"soldier.sdkmesh_anim")
);
    break;
}

m_animation.Bind(*m_model);

m_drawBones = ModelBone::MakeArray(m_model->bones.size());

}

DirectX::ModelBone::TransformArray m_drawBones;

DX::AnimationCMO m_animation;

`

You declared:

DX::AnimationCMO m_animation;

You need to change it to:

DX::AnimationSDKMESH m_animation;