do I something wrong? seems like the SharedMesh is drawn twice.
import com.jme.app.SimpleGame;
import com.jme.math.Vector2f;
import com.jme.math.Vector3f;
import com.jme.renderer.ColorRGBA;
import com.jme.scene.shape.Sphere;
import com.jme.scene.SharedMesh;
import com.jme.bounding.BoundingBox;
import com.jme.renderer.Renderer;
public class SharedMeshTest extends SimpleGame {
private TerrainContinuous tc;
public static void main(String[] args) {
SharedMeshTest app = new SharedMeshTest();
app.setDialogBehaviour(ALWAYS_SHOW_PROPS_DIALOG);
app.start();
}
protected void simpleInitGame() {
cam.setFrustumPerspective(45.f, 1.333f, 1.f, 4096.f);
cam.update();
// 1 Mesh, 32256 Triangles
Sphere s = new Sphere("Sphere", 128, 128, 32.f);
s.setLocalTranslation(new Vector3f(0.f, 0.f, -64.f));
s.setModelBound(new BoundingBox());
s.updateModelBound();
//rootNode.attachChild(s);
// 2 Mesh, 64512 Triangles
SharedMesh sm = new SharedMesh("SharedMesh", s);
sm.setLocalTranslation(new Vector3f(0.f, 0.f, -64.f));
rootNode.attachChild(sm);
rootNode.updateWorldBound();
}
}