what can the prob be
// this is the function that puts the 3D models into video RAM
void init_graphics(void)
{
D3DXCreateTeapot(d3ddev, &meshTeapot, NULL); // create the teapot
CMeshHierarchy *memoryAllocator=new CMeshHierarchy;
HRESULT hr = D3DXLoadMeshHierarchyFromX("bones_all.x",
D3DXMESH_MANAGED,
d3ddev,
memoryAllocator,
NULL,
&m_frameRoot,
&m_animController);
if(SUCCEEDED(hr))
{
sprintf(buffer,"%s\n" , "bones_all.x loaded");
WriteConsole(Console , buffer, strlen(buffer),NULL,NULL);
}
if(m_animController)
{
int m_numAnimationSets = m_animController->GetMaxNumAnimationSets();
sprintf(buffer,"%s %d\n" , "m_numAnimationSets",m_numAnimationSets);
WriteConsole(Console , buffer, strlen(buffer),NULL,NULL);
}
else
{
sprintf(buffer,"%s\n" , "m_animController failed");
WriteConsole(Console , buffer, strlen(buffer),NULL,NULL);
}
/*
if(m_frameRoot)
{
SetupBoneMatrices((D3DXFRAME_EXTENDED*)m_frameRoot, NULL);
// Create the bone matrices array for use during FrameMove to hold the final transform
m_boneMatrices = new D3DXMATRIX[m_maxBones];
ZeroMemory(m_boneMatrices, sizeof(D3DXMATRIX)*m_maxBones);
// Calculate the Bounding Sphere for this model (used in CalculateInitialViewMatrix to position camera correctly)
D3DXFrameCalculateBoundingSphere(m_frameRoot, &m_sphereCentre, &m_sphereRadius);
}
*/
return;
}












