Hi,
I’m having problem with my simple benchmark app running from NetBeans. It’s very simple: 2500 boxes of random height to test speed on different computers.
But if I want to quit application, I press Escape several times. Window disappears, but process is still running (it it listed in Netbeans process list). I can terminate it but next time I run the application, it is incredible slow. I must quit netbeans, so VM can cleanup everything.
Any idea? I really need run my application more than once
Many thanks.
import com.jme.app.SimpleGame;
import com.jme.scene.shape.Box;
import com.jme.math.Vector3f;
import com.jme.renderer.ColorRGBA;
public class Benchmark extends SimpleGame {
public static void main(String[] args) {
Benchmark app = new Benchmark();
app.setDialogBehaviour(SimpleGame.ALWAYS_SHOW_PROPS_DIALOG);
app.start();
}
protected void simpleInitGame() {
randomNodes(50, 50);
}
public void randomNodes(int xCount, int yCount) {
int size = 1;
float space = 0.2f;
for (int x = 0; x < xCount; x++) {
for (int y = 0; y < yCount; y++) {
double value = 5*Math.random();
String name = "node"+String.valueOf(x)+String.valueOf(y);
Box b=new Box(name, new Vector3f(x, 0, y), new Vector3f(x+size-space, (float)value, y+size-space));
b.setRandomColors();
rootNode.attachChild(b);
}
}
}
}