Sign in to follow this  

mesh set number of vertexes

This topic is 3318 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

Hy. I have create a collada importer. The class Ccolladaimporter get a ID3DXMesh and fill it with the collada file data , but when i send the mesh i don't know haw many vertex have the file mesh. so,i create the mesh:
hr = D3DXCreateMeshFVF(
		12,//num of indexes
		8,//num of vertexes
		D3DXMESH_MANAGED,
		Vertex::FVF,
		Device,
		&Mesh);
and the importer fill it:
CImporter *importer= new CImporter(Mesh,IMPORTER_COLLADA);
importer->Init("c:\\colladafile.dae"); 
Is possible to update the number of vertex and the number of indexes? thanks.

Share this post


Link to post
Share on other sites
1)I thinks that I can create the mesh directly in the Cimporter class,but for this i must send the device and i'm not sure of this is correct, i ask you.

2)Another method can be create a CColladaMesh that inerith from the ID3DXMesh 3d class and insert all the code for the importer in it.
But in this mode I encumber the result mesh class

Share this post


Link to post
Share on other sites
Looking at the Mesh functions, I don't see any way to resize the vertex and index buffers. Since this is a loading/preprocessing step you might have the collada importer parse the file and store temporary data structures. Then you'll have the final vertex count and can initialize the mesh.

Share this post


Link to post
Share on other sites

This topic is 3318 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