I am working with Direct3X 9. In order to improve performance during runtime, I have been working to create progressive meshes using D3DXGeneratePMesh().

So far so good, the mesh was created and there were no errors throughout the application. HOWEVER, the model was not displaying on the screen. After a long debug process, I found the error to be in the D3DXFrameCalculateBoundingSphere function. If I remove the convertion into a progressive mesh, it works fine, but after converting, the function returns a 0 center and 0 radius but returns S_OK.

This to me assumes that it does not find any meshes whilst traversing the frame structure. Does anybody know why this would be?. Any meshes converted to PMesh has the meshData.Type set to D3DXMESHTYPE_PMESH so there should be no confusions.

If there is need to see source code, let me know which bits you need. Thanks,


On further investigation, changing the mesh type back to D3DXMESHTYPE_MESH (even though it is really a PMESH) makes it work fine.

Can anyone help me to understand why? MSDN does not mention any restrictions with respect to the D3DXFrameCalculateBoundingSphere function.

Anyways, for a temporary fix, I think I'm going to use a separate flag to indicate to the rest of the application that the mesh is progressive.

I don't think I should mark this as solved though as it isn't really a fix, more of a temporary workaround; I really would like to know what could cause this.