Original Post
Hy. I use directx for personal study... I have a mesh object pMesh of type ID3DXMesh* in the main class. I create an importer class that create inside a mesh with the function:
Quote:the class have a member var called m_mesh of type ID3DXMesh*. I create an istance of the importer class and pass the mesh class:
bool CImporter::CreateMesh(int nVertexes, int nIndexes) { HRESULT hr = D3DXCreateMeshFVF(12,8,D3DXMESH_MANAGED,Vertex::FVF,m_Device,&m_mesh); if(FAILED(hr)) { ::MessageBox(0, "Collada CreateMesh() - FAILED", 0, 0); return false; } return true; }
Quote:the mesh is loaded correctly in the importer class, but when i'm exit from the importer class the pMesh is null, but in the importer class the mesh have a fine value. Why? Thanks
CImporter *cin= new CImporter(pMesh,Device,IMPORTER_COLLADA);