0

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,

Dipun

1
Contributor
1
Reply
2
Views
8 Years
Discussion Span
Last Post by dipunm
0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.