Skip to content
Snippets Groups Projects
Commit f9a872b2 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

make the lock on mesgh drawing local, so that we can draw a mesh during
parsing
parent ec5bd98a
No related branches found
No related tags found
No related merge requests found
// $Id: Mesh.cpp,v 1.209 2007-10-02 20:07:29 geuzaine Exp $ // $Id: Mesh.cpp,v 1.210 2007-11-21 14:22:38 geuzaine Exp $
// //
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
// //
...@@ -832,8 +832,9 @@ void Draw_Mesh() ...@@ -832,8 +832,9 @@ void Draw_Mesh()
else else
glDisable((GLenum)(GL_CLIP_PLANE0 + i)); glDisable((GLenum)(GL_CLIP_PLANE0 + i));
if(!CTX.threads_lock){ static bool busy = false;
CTX.threads_lock = 1; if(!busy){
busy = true;
GModel *m = GModel::current(); GModel *m = GModel::current();
int status = m->getMeshStatus(); int status = m->getMeshStatus();
if(CTX.mesh.changed) { if(CTX.mesh.changed) {
...@@ -859,7 +860,7 @@ void Draw_Mesh() ...@@ -859,7 +860,7 @@ void Draw_Mesh()
if(status >= 3) if(status >= 3)
std::for_each(m->firstRegion(), m->lastRegion(), drawMeshGRegion()); std::for_each(m->firstRegion(), m->lastRegion(), drawMeshGRegion());
CTX.mesh.changed = 0; CTX.mesh.changed = 0;
CTX.threads_lock = 0; busy = false;
} }
for(int i = 0; i < 6; i++) for(int i = 0; i < 6; i++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment