Create a separate JFrame ontop of a fullscreened LWJGL display

So I’m fooling around in lwjgl, and making this little multi-purpose game engine as a side-project. I wanted to make it so that I could have my own “popup” dialogue boxes using JFrames. They work perfectly fine, when the window is not in fullscreen. However, when the window IS in fullscreen, the JFrame is created behind the lwjgl Display, and not ontop of it.

to get into fullscreen I use:

Display.setFullscreen(bool);

I also made sure that “always stay ontop” was enabled on the JFrame.

Any ideas?

Hi

I know you can also use [icode]Sys.alert(title, message)[/icode]. :slight_smile:

CopyableCougar4

Why not just program your own popup windows so that they show up in the OpenGL window? It shouldn’t be that hard.

Well [icode]Sys.alert(title, message)[/icode] would use native C++ windows and saves you a LOT of time and code :stuck_out_tongue: It would also allow for the windows to be unique for each OS.

CopyableCougar4

As far as I know (I might be wrong), it is impossible to overlay any swing or awt components/windows/dialogs over a fullscreen OpenGL-context in a simple/straightforward way.

You are better of using a OpenGL based GUI.
I recommend using a existing GUI-Library for OpenGL, like TWL or scene2D.

Have an nice day.

  • Longor1996

[quote]As far as I know (I might be wrong), it is impossible to overlay any swing or awt components/windows/dialogs over a fullscreen OpenGL-context in a simple/straightforward way.
[/quote]
I made that experience trying to overlay another JFrame over a fullscreen JFrame (no OpenGL involved though). It works on Windows but does not display anything under Mac/Linux.

It’s possible that LWJGL works in different way. Anyhow, you have been warned. :slight_smile:

In theory, this is the layering in a window-manager:

  • desktop
  • z-ordered windows
  • taskbar
  • z-ordered always-on-top windows
  • User Account Control modal dialogs
  • fullscreen exclusive mode window (not plural)

If you can visualize anything on top of a fullscreen window, the window-manager implementation is b0rked.