- Without -Djava.awt.headless and with a very small fix inside GLFW, AWT before GLFW works perfectly. I could even have a GLFW window side-by-side a JFrame. Only limitation: any AWT windows must be disposed before GLFW, otherwise the AWT windows hang without an event loop.
Any updates on this? (It seems that GLFW 3.1 is nearly there)
I was playing with GLFW / Swing on OSX (only for a OSX menubar). Newer nightly builds now ask me to use -XstartOnFirstThread. If I use it and start GLWF first, AWT/Swing seem not to work. If I start AWT/Swing first they erase the -XstartOnFirstThread flag as you said and GLFW does not load.
Will this small fix become available?
UPDATE:
I tested with the option with -Djava.awt.headless=true, and the result was this:
Exception in thread "AWT-EventQueue-0"
"Application.setDefaultMenuBar() only works with the Aqua Look and Feel"
Then I saw what headless do I realised that it definitively is not a solution for any application other than a single-windowed game (even multi-windowed games, map editors, etc may need auxiliary gui components, floating windows, etc)
--
What JGLFW do different?
"Integration with Swing or AWT is not possible (so, no Applets either).
You can however open Swing and AWT frames besides GLFW windows."
https://github.com/badlogic/jglfw--
UPDATE 2:
I see the issue is old:
http://www.java-gaming.org/topics/lwjgl3-moves-to-glfw/30793/view.htmlI spent a lot of time researching this but the issue is definitively beyond my expertise. I thought I only need to create windows and render stuff in the main thread (i.e. whatever thread started launched my application). If I have my app running before any calls to AWT I do not see how it can interfere with GLFW unless, if I understood correctly, the JVM reserves a thread for AWT and launches your app in a secondary thread (if you do not use -XstartOnFirstThread).
Before the changes you guys did in EventLoop.java it seemed to work. (Actually, I did not understood why lwjgl would needed to initialise AWT in the old version)