瀏覽代碼

Line shape now rewinds the buffer before data is set in updatePoints()

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9778 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
bre..om 13 年之前
父節點
當前提交
211b63be84
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      engine/src/core/com/jme3/scene/shape/Line.java

+ 2 - 2
engine/src/core/com/jme3/scene/shape/Line.java

@@ -84,9 +84,9 @@ public class Line extends Mesh {
      */
     public void updatePoints(Vector3f start, Vector3f end) {
         VertexBuffer posBuf = getBuffer(Type.Position);
-
+        
         FloatBuffer fb = (FloatBuffer) posBuf.getData();
-
+        fb.rewind();
         fb.put(start.x).put(start.y).put(start.z);
         fb.put(end.x).put(end.y).put(end.z);