From 6970c8db8ad25012cf165e225de1aacbb1230a31 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Mon, 14 Sep 2015 23:01:46 -0400 Subject: [PATCH] shapes: set static usage on all VBs --- jme3-core/src/main/java/com/jme3/scene/debug/Grid.java | 1 + jme3-core/src/main/java/com/jme3/scene/debug/WireFrustum.java | 2 ++ jme3-core/src/main/java/com/jme3/scene/shape/Cylinder.java | 1 + jme3-core/src/main/java/com/jme3/scene/shape/Quad.java | 1 + jme3-core/src/main/java/com/jme3/scene/shape/Sphere.java | 2 +- 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/scene/debug/Grid.java b/jme3-core/src/main/java/com/jme3/scene/debug/Grid.java index 5b6d0661e..563981804 100644 --- a/jme3-core/src/main/java/com/jme3/scene/debug/Grid.java +++ b/jme3-core/src/main/java/com/jme3/scene/debug/Grid.java @@ -99,6 +99,7 @@ public class Grid extends Mesh { updateBound(); updateCounts(); + setStatic(); } } diff --git a/jme3-core/src/main/java/com/jme3/scene/debug/WireFrustum.java b/jme3-core/src/main/java/com/jme3/scene/debug/WireFrustum.java index c050d1edb..4f5364753 100644 --- a/jme3-core/src/main/java/com/jme3/scene/debug/WireFrustum.java +++ b/jme3-core/src/main/java/com/jme3/scene/debug/WireFrustum.java @@ -35,6 +35,7 @@ import com.jme3.math.Vector3f; import com.jme3.scene.Mesh; import com.jme3.scene.VertexBuffer; import com.jme3.scene.VertexBuffer.Type; +import com.jme3.scene.VertexBuffer.Usage; import com.jme3.util.BufferUtils; import java.nio.FloatBuffer; @@ -62,6 +63,7 @@ public class WireFrustum extends Mesh { 3, 7, } ); + getBuffer(Type.Index).setUsage(Usage.Static); setMode(Mode.Lines); } diff --git a/jme3-core/src/main/java/com/jme3/scene/shape/Cylinder.java b/jme3-core/src/main/java/com/jme3/scene/shape/Cylinder.java index f0966328f..1d215eb6b 100644 --- a/jme3-core/src/main/java/com/jme3/scene/shape/Cylinder.java +++ b/jme3-core/src/main/java/com/jme3/scene/shape/Cylinder.java @@ -389,6 +389,7 @@ public class Cylinder extends Mesh { } updateBound(); + setStatic(); } @Override diff --git a/jme3-core/src/main/java/com/jme3/scene/shape/Quad.java b/jme3-core/src/main/java/com/jme3/scene/shape/Quad.java index 194535851..3e0c6ce7e 100644 --- a/jme3-core/src/main/java/com/jme3/scene/shape/Quad.java +++ b/jme3-core/src/main/java/com/jme3/scene/shape/Quad.java @@ -124,6 +124,7 @@ public class Quad extends Mesh { } updateBound(); + setStatic(); } diff --git a/jme3-core/src/main/java/com/jme3/scene/shape/Sphere.java b/jme3-core/src/main/java/com/jme3/scene/shape/Sphere.java index 89db073a7..44aa41723 100644 --- a/jme3-core/src/main/java/com/jme3/scene/shape/Sphere.java +++ b/jme3-core/src/main/java/com/jme3/scene/shape/Sphere.java @@ -299,7 +299,6 @@ public class Sphere extends Mesh { } updateBound(); - setStatic(); } /** @@ -400,6 +399,7 @@ public class Sphere extends Mesh { this.interior = interior; setGeometryData(); setIndexData(); + setStatic(); } public void read(JmeImporter e) throws IOException {