shapes: set static usage on all VBs

This commit is contained in:
Kirill Vainer
2015-09-14 23:01:46 -04:00
parent 1aaf806c65
commit 6970c8db8a
5 changed files with 6 additions and 1 deletions
@@ -99,6 +99,7 @@ public class Grid extends Mesh {
updateBound(); updateBound();
updateCounts(); updateCounts();
setStatic();
} }
} }
@@ -35,6 +35,7 @@ import com.jme3.math.Vector3f;
import com.jme3.scene.Mesh; import com.jme3.scene.Mesh;
import com.jme3.scene.VertexBuffer; import com.jme3.scene.VertexBuffer;
import com.jme3.scene.VertexBuffer.Type; import com.jme3.scene.VertexBuffer.Type;
import com.jme3.scene.VertexBuffer.Usage;
import com.jme3.util.BufferUtils; import com.jme3.util.BufferUtils;
import java.nio.FloatBuffer; import java.nio.FloatBuffer;
@@ -62,6 +63,7 @@ public class WireFrustum extends Mesh {
3, 7, 3, 7,
} }
); );
getBuffer(Type.Index).setUsage(Usage.Static);
setMode(Mode.Lines); setMode(Mode.Lines);
} }
@@ -389,6 +389,7 @@ public class Cylinder extends Mesh {
} }
updateBound(); updateBound();
setStatic();
} }
@Override @Override
@@ -124,6 +124,7 @@ public class Quad extends Mesh {
} }
updateBound(); updateBound();
setStatic();
} }
@@ -299,7 +299,6 @@ public class Sphere extends Mesh {
} }
updateBound(); updateBound();
setStatic();
} }
/** /**
@@ -400,6 +399,7 @@ public class Sphere extends Mesh {
this.interior = interior; this.interior = interior;
setGeometryData(); setGeometryData();
setIndexData(); setIndexData();
setStatic();
} }
public void read(JmeImporter e) throws IOException { public void read(JmeImporter e) throws IOException {