I am using jme3 canvas inside a swing application to display some 3D data. I set the 3d data (vertices & indices) on a mesh using setBuffer and keep a list of all loaded meshes around. Now, usually when the user closes the window, I call stop and destroy on the application instance. This however also deletes the buffers which I have set on my geometry.
I’d like to keep the buffers around, so I figured I’d just have to omit the call to destroy and simply re-create a new canvas using createCanvas but alas, when doing this the app freezes sooner or later (not deterministically unfortunately).
So what I’d like to know is:
How can I keep the application “running” even after the user has closed the window which contains the jme3 canvas? And how am I to reconstruct the canvas once the user has closed it (i.e. do I have to create a new canvas using createCanvas or call startCanvas again)?
Would love to get a reply.
Just remove the canvas from the frame
I’ve tried re-using the canvas and keeping the app alive (i.e. by not calling destroy/stop) even when closing frames and creating new ones, but this causes the lwjgl thread to block/freeze at some point.
Are you running on linux or mac os x? Could you provide a test case?