From 864ca1e470bbec411058810beb11195f0906841a Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Tue, 28 Aug 2018 18:21:33 +0800 Subject: [PATCH] MeshGui::SoFCIndexedFaceSet: fix missing normal cache unlock --- src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp b/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp index 637302b8a3..ad27faf945 100644 --- a/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp +++ b/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp @@ -576,6 +576,9 @@ void SoFCIndexedFaceSet::drawFaces(SoGLRenderAction *action) drawCoords(static_cast(coords), cindices, numindices, normals, nindices, &mb, mindices, binding, &tb, tindices); + + if(normalCacheUsed) + this->readUnlockNormalCache(); // Disable caching for this node SoGLCacheContextElement::shouldAutoCache(state, SoGLCacheContextElement::DONT_AUTO_CACHE); #endif @@ -847,6 +850,9 @@ void SoFCIndexedFaceSet::generateGLArrays(SoGLRenderAction * action) } render.generateGLArrays(action, matbind, face_vertices, face_indices); + + if(normalCacheUsed) + this->readUnlockNormalCache(); } void SoFCIndexedFaceSet::doAction(SoAction * action)