Explorar el Código

* TangentBinormalGenerator will replace the tangent buffer if it already exists on the mesh, instead of crashing

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9445 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Sha..om hace 13 años
padre
commit
2f2c44d6b1
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      engine/src/core/com/jme3/util/TangentBinormalGenerator.java

+ 2 - 0
engine/src/core/com/jme3/util/TangentBinormalGenerator.java

@@ -611,6 +611,8 @@ public class TangentBinormalGenerator {
             }
         }
         
+        // If the model already had a tangent buffer, replace it with the regenerated one
+        mesh.clearBuffer(Type.Tangent); 
         mesh.setBuffer(Type.Tangent, 4, tangents);
 //        if (!approxTangent) mesh.setBuffer(Type.Binormal, 3, binormals);
     }