From 7659a7b986c1779158cb70082bf10a9a2ed1822d Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Mon, 14 Sep 2015 23:03:08 -0400 Subject: [PATCH] TestCustomAnim: fix crash when enabling HW skinning --- .../src/main/java/jme3test/model/anim/TestCustomAnim.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jme3-examples/src/main/java/jme3test/model/anim/TestCustomAnim.java b/jme3-examples/src/main/java/jme3test/model/anim/TestCustomAnim.java index e220eeb37..b5eeb5365 100644 --- a/jme3-examples/src/main/java/jme3test/model/anim/TestCustomAnim.java +++ b/jme3-examples/src/main/java/jme3test/model/anim/TestCustomAnim.java @@ -73,6 +73,13 @@ public class TestCustomAnim extends SimpleApplication { Box box = new Box(1, 1, 1); + VertexBuffer weightsHW = new VertexBuffer(Type.HWBoneWeight); + VertexBuffer indicesHW = new VertexBuffer(Type.HWBoneIndex); + indicesHW.setUsage(Usage.CpuOnly); + weightsHW.setUsage(Usage.CpuOnly); + box.setBuffer(weightsHW); + box.setBuffer(indicesHW); + // Setup bone weight buffer FloatBuffer weights = FloatBuffer.allocate( box.getVertexCount() * 4 ); VertexBuffer weightsBuf = new VertexBuffer(Type.BoneWeight);