Hello,
I’ve just switched from JmeCanvasContext to AwtPanelsContext, but i immediately noticed, that the debug info ( fps and staview) has disapperad and I can’t fugure out how to enable it again.
Test case :
Debug info normally shows when extending from SimpleAplication.
[java]package tests.awt;
import com.jme3.app.SimpleApplication;
import com.jme3.system.AppSettings;
import com.jme3.system.awt.AwtPanel;
import com.jme3.system.awt.AwtPanelsContext;
import com.jme3.system.awt.PaintMode;
import javax.swing.;
import java.awt.;
public class TestAwt {
private AwtPanel panel;
class App extends SimpleApplication {
@Override
public void simpleInitApp() {
panel.attachTo(false, viewPort);
guiViewPort.setClearFlags(true, true, true);
setDisplayStatView(true);
setDisplayFps(true);
}
}
void run() {
final App app = new App();
app.setShowSettings(false);
AppSettings settings = new AppSettings(true);
settings.setCustomRenderer(AwtPanelsContext.class);
settings.setFrameRate(60);
app.setSettings(settings);
app.start();
SwingUtilities.invokeLater(new Runnable() {
public void run() {
final AwtPanelsContext ctx = (AwtPanelsContext) app.getContext();
panel = ctx.createPanel(PaintMode.Accelerated);
panel.setPreferredSize(new Dimension(400, 300));
ctx.setInputSource(panel);
}
});
JFrame frame = new JFrame("Render Display " );
frame.getContentPane().setLayout(new BorderLayout());
frame.getContentPane().add(panel, BorderLayout.CENTER);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
public static void main(String... args) {
new TestAwt().run();
}
}
[/java]
Thanks for any help