From 2f2c44d6b1de48f12f0943da57563ad6ac8736fb Mon Sep 17 00:00:00 2001 From: "Sha..om" Date: Fri, 1 Jun 2012 20:44:23 +0000 Subject: [PATCH] * 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 --- engine/src/core/com/jme3/util/TangentBinormalGenerator.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/src/core/com/jme3/util/TangentBinormalGenerator.java b/engine/src/core/com/jme3/util/TangentBinormalGenerator.java index 36ab1cd19..13eded2d0 100644 --- a/engine/src/core/com/jme3/util/TangentBinormalGenerator.java +++ b/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); }