On the pure client version everything works fine, however on my new server where I disable all D3D rendering, the call fails.
I simply want to access my animation timing data in my .x files for server purposes.
I simply use this line:
hr = ( D3DXLoadMeshHierarchyFromX( VGlobal::CURRWORKDIR + VGlobal::CurrMeshDir + smName, D3DXMESH_MANAGED, g_pd3dDevice,
&Alloc, NULL, &g_pFrameRoot, &g_pAnimController ) );
And when g_pd3dDevice is NULL, the call fails.
This is the function I am trying to call:
ID3DXAnimationSet * animationSet = NULL;
if( g_pAnimController != NULL )
{
if( g_pAnimController->GetAnimationSet( animSetID, &animationSet ) == S_OK )
{
int tAnim = int(animationSet->GetPeriod() * 1000);
SAFE_RELEASE( animationSet );
return tAnim;
}
}
Thanks.