Updating Display Settings Darkens Scene

I’ve been fooling around with creating a “Display Settings” example in JME with nifty that let you change how the game displays without having to restart the application. However, I’ve come across a really bizarre bug where, when updating certain settings and restarting the context, everything ends up being very dark.
Before:


After:

In LWJGL 3, this happens whenever I restart the context, even if I comment out any changes to the settings. On LWJGL 2, however, this only happens if I change the antialiasing (setSample) settings (I can set them before I launch the app just fine. Changing them afterwards is the issue).
Has anyone else run into this?
If it helps at all, I’ve been running this on Ubuntu Linux 20.04, with the GNOME environment. I have an NVIDIA Quadro M4000 using the nvidia-driver-450 proprietary driver.

I think this has been reported before. For instance: https://hub.jmonkeyengine.org/t/white-screen-on-context-restart/43866/5

2 Likes

There does seem to be similarities. However, @tlf30’s example triggered every time he restarted the LWJGL2 context. Mine only seems to trigger when I mess with the antialiasing. Furthermore, @tlf30’s example will show white on LWJGL3, while mine gets darker instead.
That said, there does seem to be a connection. It doesn’t look like @tlf30’s issue ever got solved, though.

Mine showed white because that was the background color I had set in settings. And Iirc mine was using LWJGL3 when it goes to the background color, otherwise on LWJGL2 it got significantly darker.

Edit: my tests were on windows 10 on an nvidia rtx titan. And I am not using nifty.

I just tested it on my Windows partition (NVIDIA Quadro M4000), and I’m getting the same issue as on my Linux.