I am trying to get myself into the scope of OpenGL Libgdx. I used LwjglApplicationto create simple applications that display fields, some meshes, and some textures. I came across an Aurelien Ribon application that creates Box2D rigid bodies. He used LwjglCanvasto integrate with Java Swing. I tried to do it myself, I created JFrameand then added LwjglCanvas. Then set the JFramedefault value to EXIT_ON_CLOSE.
However, whenever I close the application, this leads to my console:
AL lib: alc_cleanup: 1 device not closed.
I do not know what this means, and it does no harm to me. I just want to know what that means. According to the LwjglCanvasdocs:
All OpenGL calls are done on the EDT. This is slightly less efficient then a dedicated thread, but greatly simplifies synchronization. Note that you may need to call stop() or a Swing application may deadlock on System.exit due to how LWJGL and/or Swing deal with shutdown hooks.
Where should I bind LwjglCanvas.stop(), should I add it to the queue, EventDispatchThreador should I bind it to JFrame.addWindowListener?
And what does "AL lib: alc_cleanup: 1 device not closed" mean?
Thank you so much!
source
share