From 23c992b05b78916619cddeba6c819d4699d9e7aa Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Wed, 8 Jun 2011 20:49:12 +0000 Subject: [PATCH] curve : fixed wrong index buffer allocation git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7558 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/scene/shape/Curve.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/core/com/jme3/scene/shape/Curve.java b/engine/src/core/com/jme3/scene/shape/Curve.java index 3b4387f28..db032fb32 100644 --- a/engine/src/core/com/jme3/scene/shape/Curve.java +++ b/engine/src/core/com/jme3/scene/shape/Curve.java @@ -122,7 +122,7 @@ public class Curve extends Mesh { this.setMode(Mesh.Mode.Lines); this.setBuffer(VertexBuffer.Type.Position, 3, array); - this.setBuffer(VertexBuffer.Type.Index, 3, indices);//(spline.getControlPoints().size() - 1) * nbSubSegments * 2 + this.setBuffer(VertexBuffer.Type.Index, 2, indices);//(spline.getControlPoints().size() - 1) * nbSubSegments * 2 this.updateBound(); this.updateCounts(); } @@ -244,7 +244,7 @@ public class Curve extends Mesh { this.setMode(Mesh.Mode.Lines); this.setBuffer(VertexBuffer.Type.Position, 3, array); - this.setBuffer(VertexBuffer.Type.Index, (spline.getControlPoints().size() - 1) * 2, indices); + this.setBuffer(VertexBuffer.Type.Index, 2, indices); this.updateBound(); this.updateCounts(); }