Commit ab38d94a authored by Jan Möbius's avatar Jan Möbius

Fixed crash when handling point clouds as meshes caused by empty invVertexMap in DrawMesh

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17897 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 71b2be48
......@@ -177,16 +177,19 @@ DrawMeshT<Mesh>::rebuild()
numVerts_ = mesh_.n_vertices();
vertices_ = new Vertex[numVerts_];
verticesTmp_ = new Vertex[numVerts_];
invVertexMap_ = new unsigned int[mesh_.n_vertices()];
}
numVerts_ = mesh_.n_vertices();
// read all vertices
for (size_t i = 0; i < numVerts_; ++i)
for (size_t i = 0; i < numVerts_; ++i) {
readVertex(vertices_ + i,
mesh_.vertex_handle(i),
(typename Mesh::HalfedgeHandle)(-1),
(typename Mesh::FaceHandle)(-1));
invVertexMap_[i] = i;
}
createVBO();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment