|
|
|
@ -388,7 +388,7 @@ public class Mesh implements Savable, Cloneable { |
|
|
|
|
tangents.setUsage(Usage.Stream); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
//if HWBoneIndex and HWBoneWieght are empty, we setup them as direct
|
|
|
|
|
//if HWBoneIndex and HWBoneWeight are empty, we setup them as direct
|
|
|
|
|
//buffers with software anim buffers data
|
|
|
|
|
VertexBuffer indicesHW = getBuffer(Type.HWBoneIndex); |
|
|
|
|
if (indicesHW.getData() == null) { |
|
|
|
@ -414,12 +414,25 @@ public class Mesh implements Savable, Cloneable { |
|
|
|
|
VertexBuffer positions = getBuffer(Type.Position); |
|
|
|
|
VertexBuffer normals = getBuffer(Type.Normal); |
|
|
|
|
VertexBuffer tangents = getBuffer(Type.Tangent); |
|
|
|
|
|
|
|
|
|
VertexBuffer positionsBP = getBuffer(Type.BindPosePosition); |
|
|
|
|
VertexBuffer normalsBP = getBuffer(Type.BindPoseNormal); |
|
|
|
|
VertexBuffer tangentsBP = getBuffer(Type.BindPoseTangent); |
|
|
|
|
|
|
|
|
|
positions.setUsage(Usage.Static); |
|
|
|
|
positionsBP.copyElements(0, positions, 0, positionsBP.getNumElements()); |
|
|
|
|
positions.setUpdateNeeded(); |
|
|
|
|
|
|
|
|
|
if (normals != null) { |
|
|
|
|
normals.setUsage(Usage.Static); |
|
|
|
|
normalsBP.copyElements(0, normals, 0, normalsBP.getNumElements()); |
|
|
|
|
normals.setUpdateNeeded(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (tangents != null) { |
|
|
|
|
tangents.setUsage(Usage.Static); |
|
|
|
|
tangentsBP.copyElements(0, tangents, 0, tangentsBP.getNumElements()); |
|
|
|
|
tangents.setUpdateNeeded(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|