• Advertisement
Sign in to follow this  

Back on the Loading X File Problem

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

Hey all, I have a mesh Hierarchy X file loader, I used the Toymaker's tut's for the design. And it worked fine untill one day I made a new mesh and tryed to load it and it failed. It loaded in the SDK's MView program. I traced the error down to this part of the CreateMeshContainer function
//this lot here does not work
	//	pMeshData->pMesh->GetFVF(), pd3dDevice, 
	//	&newMeshContainer->MeshData.pMesh);

//THIS WORKS OR Returns no error
			return E_FAIL;

//new bit still not working
	HRESULT hr = pMeshData->pMesh->CloneMesh(D3DXMESH_MANAGED, 
								Declaration, pd3dDevice, 

	{		if(hr == D3DERR_INVALIDCALL)
//BUT if I do this it works	
	newMeshContainer->MeshData.pMesh = pMeshData->pMesh;
The Question is how should I handle the copying of the mesh passed back when I load with D3DXLoadMeshHierarchyFromX function in the CreateMeshContainer function. Should I just set it like this newMeshContainer->MeshData.pMesh = pMeshData->pMesh; newMeshContainer->MeshData.pMesh->AddRef(); The SDK's MView uses this method above

Share this post

Link to post
Share on other sites
Can the GetDeclaration() function return more then MAX_FVF_DECL_SIZE = 65
What happens if you have a mesh with 165000 vertices.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement