How to display FPS in SimpleGame with jME 2?

Thanks for helping; total jME noob here



Ok, so I have created Lesson1 accoring to the jME 2 tutorial here:

http://www.jmonkeyengine.com/wiki/doku.php?id=jme2-creating_your_first_app_with_simplegame



However, I am not getting the FPS and vertices stats.  I have looked at the jME 1 to 2 changes page:

http://www.jmonkeyengine.com/wiki/doku.php?id=jme_to_jme2_changes



And I have searched the forums, and Googled around, but no dice.



What class(es) let me set my app to display those stats in jME 2?



My code is below. Thanks in advance for your help.


  • Chris


import com.jme.app.SimpleGame;
import com.jme.scene.shape.Sphere;
import com.jme.math.Vector3f;
import com.jme.bounding.BoundingBox;
import com.jme.scene.state.TextureState;
import com.jme.image.Texture;
import com.jme.util.TextureManager;

 
public class Lesson1 extends SimpleGame {
   public static void main(String[] args) {
       Lesson1 app = new Lesson1();
       app.setConfigShowMode(ConfigShowMode.AlwaysShow);
       app.start();
   }
 
        protected void simpleInitGame() {
              display.setTitle("Tutorial 1");

              Sphere s = new Sphere("Sphere", 30, 30, 25);
              s.setLocalTranslation(new Vector3f(0,0,-40));
              s.setModelBound(new BoundingBox());
              s.updateModelBound();

              Texture texture = TextureManager.loadTexture(
                            Lesson1.class.getClassLoader().getResource(
                            "jmetest/data/images/Monkey.jpg"),
                            Texture.MinificationFilter.Trilinear,
                            Texture.MagnificationFilter.Bilinear);
              TextureState ts = display.getRenderer().createTextureState();
              ts.setEnabled(true);
              ts.setTexture(texture);

              s.setRenderState(ts);

              rootNode.attachChild(s);
   }
}



Or is the answer that stats. in jME 2 don't look like that screenshot? I know I can hit F4 and get those fancy graphs. Is there no longer a "pared down" version with just a couple of counters at the bottom of the window/screen?



Thanks for your help!


  • Chris

Currently there is only the F4 stat thing.

But i think i simple fps display would be a good idea.