Multiple canvases and resizing

Hi everyone,



I'm using jME 2.0 as a graphical engine in my application, where I create several JMECanvases. Using the docking framework I'm able to dock and undock these canvases. I noticed a weird behavior while resizing one of the canvases: the content of all the other canvases is affected - the graphics on other canvases is being resized as well. What might be the cause of this behavior?



Here is how canvas is created:


DisplaySystem.getDisplaySystem("lwjgl").registerCanvasConstructor("AWT", LWJGLAWTCanvasConstructor.class);
canvas = (Canvas)DisplaySystem.getDisplaySystem("lwjgl").createCanvas(getWidth(), getHeight());
impl = new MyImplementor(getWidth(), getHeight());
((JMECanvas)canvas).setImplementor(impl);



Here's how the Implementor looks like:

class MyImplementor extends SimpleCanvasImpl {
 

What might be the cause of this behavior?


jME is really only intended to be run in a singular fashion and doesn't (yet) support multiple cameras (although I think it does support multiple viewports, could be wrong there though...)

jME is really only intended to be run in a singular fashion and doesn't (yet) support multiple cameras
(although I think it does support multiple viewports, could be wrong there though...)



Thanks for clarifying this.
Out of curiosity, what's the complexity of implementing such a solution and how hard the implementation would be for a team of several jMonkey beginners?
And what would be the good starting point before diving into this?


I would say very difficult; one major issue is thread safety…



(can 'adjust' the requirements slightly?)

http://www.jmonkeyengine.com/jmeforum/index.php?topic=7168.0



This allows you to use multiple canvases… See this thread for an example:

http://www.jmonkeyengine.com/jmeforum/index.php?topic=6216.0

It might also be useful to see Ardor3D for an example.  It was built specifically to allow for multiple canvases with multiple (or shared) gl contexts.

Oh that's right, Momoko_Fan already did it (cause he's the man :))



(forgot about that…)