Commit 11919189 authored by Christopher Tenter's avatar Christopher Tenter
Browse files

Crashfix, where mesh was not build yet, but picking needed refs #281

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13505 383ad7c9-94d9-4d36-a494-682f7c89f535
parent abee6a04
......@@ -1321,7 +1321,11 @@ template <class Mesh>
void DrawMeshT<Mesh>::updatePickingFaces(ACG::GLState& _state )
{
// Make sure, the face buffers are up to date before generating the picking data!
// updatePerFaceBuffers();
if (!numTris_ && mesh_.n_faces())
{
rebuild_ = REBUILD_FULL;
rebuild();
}
pickFaceVertexBuf_.resize(3 * numTris_);
pickFaceColBuf_.resize(3 * numTris_);
......@@ -1348,8 +1352,11 @@ void DrawMeshT<Mesh>::updatePickingFaces(ACG::GLState& _state )
template <class Mesh>
void DrawMeshT<Mesh>::updatePickingAny(ACG::GLState& _state )
{
// stripify()
if (!numTris_ && mesh_.n_faces())
{
rebuild_ = REBUILD_FULL;
rebuild();
}
pickFaceVertexBuf_.resize(3 * numTris_);
pickAnyFaceColBuf_.resize(3 * numTris_);
......
Supports Markdown
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