Hello,
I'm at the task to create a render window that can be resized at runtime by the user.
It is demanded, that the window will not have a fixed size like 1024x768.
It would be nice, if you could switch to fullscreen and back, but not necessary.
My question:
How to make something like this with jME?
Have until now only used the property dialog that comes with jME.
EDIT:
Is it possible to keep the scenegraph and not need to rebuild it completely?
How do I make this?
Have a look at TestRecreateWindow. Is this what you need?
If you need the user to resize the window by dragging the corners with the mouse consider to use a swing frame with a canvas instead (or ask some lwjgl folks if it's possible with the native window).
And for your question edited in, that's possible if you use a Swing frame like irrisor suggested. Look at some of the examples like the particle editor (in jmetest.effects I think)
- it is possible with recreate window, too.
ok, thank you for the hints and for the fast help!
I checked the DisplaySystem.recreateWindow function:
It works well in my app when used like in the jmetest-Demo (except for 16bit fullscreen switch - but that is due to my ATI openGL-implementation).
The only problem is, that it would be nice, to have something like a resize-event for the window or something like that.
I also took a look into the jmetest-Demos using the com.jmex.awt.SimpleCanvasImpl class.
It may be that this is more in the direction of what I need (see question below).
But I then have another problem, maybe I should post it here:
http://www.jmonkeyengine.com/jmeforum/index.php?topic=3077.0