Fix bug where normals buffer didn't update when changing surface vertex data. 74/13074/2
Pedro Arthur [Mon, 4 Nov 2013 14:31:11 +0000 (12:31 -0200)]
Change-Id: I3e08d9aaa85ebd014e6f70dcfeaa969ec0a45b92

scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/DataManager.java

index dd92f6b..145ee55 100644 (file)
@@ -431,6 +431,11 @@ public class DataManager {
             fillVertexBuffer(buf.getBuffer(), id, buf.getScale(), buf.getTranslate());
         }
 
+        ElementsBuffer normalBuffer = normalBufferMap.get(id);
+        if (normalBuffer != null) {
+            fillNormalBuffer(normalBuffer, id);
+        }
+
         ElementsBuffer colorBuffer = colorBufferMap.get(id);
         if (colorBuffer != null) {
             fillColorBuffer(colorBuffer, id);