Sign in to follow this  

Is there a way to build a ID3DXPMesh without haveing a mesh to start with

This topic is 3595 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, Well the problem is that I was using the ID3DXMesh to hold my terrains submeshes, this works fine, then I had this crazy Idea to tri some LOD because the frame rate droped to 12 frames when the camera was zooped out over the whole terrain(the terrain has 256 subsections each sub has 2048 faces). So I used the same code to generate the terrain meshes then I use the D3DXGeneratePMesh function this works but now to create all this at runtime takes 1.2 minutes damn slow, the DX SDK say you can create a ID3DXPMesh with the D3DXGeneratePMesh or D3DXCreatePMeshFromStream Could I use this stream some how to set the PMeshes Vertex and Index buffers. and by the way the LOD with pmesh worked greate the same 256 subset terrain(face = 524,288) = FR 9.5 with LOD set to 50,944 face's it gets 27.79 frames

Share this post


Link to post
Share on other sites
Should I just post a Message to the user to go make a coffee for this will take a long time to load...???????

When I dont make a call to D3DXGeneratePMesh it only takes 0.176 minutes to create.

Could I just create a mesh then cast it to a PMesh type will that work..

Share this post


Link to post
Share on other sites
If you use the same terrain information all the time, you can try creating the pmesh and saving the pmesh to a file.

Then, instead of generating the pmesh when the game starts, load the pmesh from the file. That would, perhaps, be faster.

Share this post


Link to post
Share on other sites

This topic is 3595 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this