[lwjgl] Changing an undecorated window to decorated without destroying

Hello!

I wanted to make a simple loading splash screen, so I used this system parameter:

System.setProperty("org.lwjgl.opengl.Window.undecorated", "true");

to have an undecorated window which displays a loading image.

However, the only way I can think of changing the window back to having a decoration, is to destroy and re-create it. The problem with this, is that destroying a display removes all the currently loaded textures, making the whole load screen pointless.

Any thoughts?

I believe each thread has its own gl context. Create a new thread and try Display.create. That should create second window.

That would cause two displays to be visible at one time I believe.

[edit]
You can change the undecorated part of the display after the display has been created if you change the display mode. :slight_smile:

If you just want a splash screen before the main window shows, you could just use swing to make the splash screen then open a LWJGL display after.

or you could use Launch4j to make “Native pre-JRE splash screen in BMP format shown until the Java application starts.”

pbuffers allow sharing resources among contexts.