Fullscreen mode crashes at start with exception

I found this solution and it worked for me on (LWJGL2) OS X - MacBook Pro;

public static void main(String[] args) {
        GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();

        AppSettings setting = new AppSettings(true);
        setting.setFullscreen(true);
        setting.setFrameRate(60);
        setting.setFrequency(device.getDisplayMode().getRefreshRate());

        HelloTerrain app = new HelloTerrain();
        app.setShowSettings(false);
        app.setSettings(setting);
        app.start();
    }
1 Like