Jump to content
  • Advertisement
Sign in to follow this  
giugio

mesh set number of vertexes

This topic is 3625 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!