Change display settings after game start

Hello!

Any examples on how to change resolution or AA after the game has started ?

Just change the settings to the Application’s settings variable. Resolution changing needs you to call restart() on the application to take effect, probably many other settings as well.

With the Application class I mean something that extends the SimpleApplication (or Application).

Sweet thanks alot!

Don’t extend Application.

Oh yeah, it also does some important stuff, like the gui & root node :slight_smile: Always SimpleApp for the win :slight_smile:

This works fine but not if you have a DirectionalLightShadowRenderer processor added

Upon a key being pressed I do

settings.setResolution(1024, 768);
settings.setSamples(2);
app.restart();

Changing the resolution works fine, but changing the AA causes problems

I tried removing the processor before changing settings, and adding it again after, and also recreating the shadowrenderer again and adding it after app.restart, but no luck. Alpha seems to have gone wrong, shadows also went mad. The dark bit at the back moves around as I move the camera