shapes: set static usage on all VBs

experimental
Kirill Vainer 9 years ago
parent 1aaf806c65
commit 6970c8db8a
  1. 1
      jme3-core/src/main/java/com/jme3/scene/debug/Grid.java
  2. 2
      jme3-core/src/main/java/com/jme3/scene/debug/WireFrustum.java
  3. 1
      jme3-core/src/main/java/com/jme3/scene/shape/Cylinder.java
  4. 1
      jme3-core/src/main/java/com/jme3/scene/shape/Quad.java
  5. 2
      jme3-core/src/main/java/com/jme3/scene/shape/Sphere.java

@ -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 {

Loading…
Cancel
Save