Jme to jme2 update document

This weekend, I am moving my current project from jme 1.x to 2.x, and while it is going generally smooth (thanks to the jme to jme2 wiki page), I am having trouble zeroing in on how to replace a couple of Renderer/DisplaySystem calls – notably enableStatistics() and clearStatisitcs().  This is for framerate display, etc., in a debug mode.  (I know that there is a new debug module in 2.x but I'm not quite at the point of wiring that in, unless that's the only way to see this sort of information now.)  The relevant calls and their program positions:

main class:

private Renderer renderer = DisplaySystem.getDisplaySystem().getRenderer();

create method:

renderer.enableStatistics( true );



If there are new ways to get this info, the wiki will be updated accordingly.

Also, I have found an “oddity” with using a static camera.  It appears that setLeft has changed somehow.  My old setLeft used to be (0,0,1) and everything looked just great, but in jME 2.x it seems that when z=1 that only polygon backs are rendered (along with a scene flip).  See snapshots (from a simple physics lab).  When z is changed to -1 as the code below indicates, everything renders fine.  A chase camera works fine in both jme1.x and jme2.x without modification.  I don’t know if this is a bug or a fix to a bug in 1.x but if someone knows why this has changed I’ll make a note in the wiki about it as it might save others some frust(um)ration :wink:

Chase Camera view – jme1.x ok, jme2.x (shown) ok:

Static Camera setLeft = 0,0,1 – jme1.x ok, jme2.x (shown) not ok:

Static Camera setLeft = 0,0,-1 – jme2.x (shown) ok:

jme2.x cam setup code:

cam = renderer.getCamera();
cam.setFrustumPerspective(45.0f, (float) DisplaySystem.getDisplaySystem().getWidth() /
   DisplaySystem.getDisplaySystem().getHeight(), 10, 10000);
cam.setLocation(new Vector3f(0,600,0));
cam.setDirection(new Vector3f(0.0f,-1.0f,0.0f));
cam.setLeft(new Vector3f(0.0f,0.0f,-1.0f));
cam.setUp(new Vector3f(1.0f,0.0f,0.0f));

Also, what are the 2.x forms in Texture2D for these old 1.x Texture settings:



Documentation will be updated accordingly.

i second the request for explanation on how to port "renderer.enableStatistics(true)" to jme2

(EDIT: i found this

ashtonv said:


i'm guessing, but try: