I’m experiencing a problem where changing the number of anti-aliasing samples is causing geometry attached to the gui node to behave oddly and render incorrectly. Essentially any time I do this:
settings.setSamples(x)
this.restart()
Where ‘x’ is any valid number of samples different from that currently set. If the value is set at application start it works as expected.
This code for example reproduces the issue:
public class ChangeSamplingTest extends SimpleApplication implements ActionListener
{
private static final String CHANGE_SAMPLES_MAPPING_NAME = "ChangeSettings";
public ChangeSamplingTest()
{
super();
AppSettings appSettings = new AppSettings(true);
appSettings.setSamples(2);
this.setSettings(appSettings);
this.start();
}
public static void main(String[] args)
{
new ChangeSamplingTest();
}
@Override
public final void simpleInitApp()
{
this.getInputManager().addMapping(CHANGE_SAMPLES_MAPPING_NAME, new KeyTrigger(KeyInput.KEY_Q));
this.getInputManager().addListener(this, CHANGE_SAMPLES_MAPPING_NAME);
}
@Override
public final void onAction(String name, boolean isPressed, float tpf)
{
if ((name == CHANGE_SAMPLES_MAPPING_NAME) && isPressed)
{
settings.setSamples(4);
this.restart();
}
}
}
If you press q it will restart the application and the fps/stats info will disappear.
This is using the latest master checked out from github as well as a version that was a couple of months older. I’m unfamiliar with the parts of the jme code to do with restarting the application context and so my own investigations haven’t yet yielded anything. Can anybody else reproduce this?