Odd behavior in TestJMEDesktop

When I run TestJMEDesktop everything seems fine except if I click fullscreen and hold down A and S to move away. After moving for about 5 seconds the GUI disappears and all there is left is the blue background color (not the purple color from the GUI transparence). I tried to modify the code and just display a quad behind the GUI. When moving far away from that the GUI also disappears. Is this supposed to happen or do we have a bug somewhere?



S

That's scene culling. It's not really supposed to be this way in the test but it's the normal behaviour for that setup. The node that contains the JMEDesktop could be set to CULL_NEVER while in fullscreen mode to avoid this.

I just tried adding the following line to the fullscreen method:



desktopNode.setCullMode(Spatial.CULL_NEVER);



However the described behavior can be achived in the same way as before.

ah, yes, most probably the parent/root node is culled. I think a CULL_NEVER does not prevent the parent from being culled entirely - which probably can be considered as a bug?

Yes either it's a bug or it should be renamed to Spatial.CULL_NEVER_EXCEPT_IF_PARENT_IS_CULLED  :smiley:

Spatial.CULL_NEVER_SOMETIMES

Cull flags are scenegraph hints.  So they are still in the context of a scenegraph.

The following should be read in the context of SimpleGame.



Is it possible to alter the code and add another rootNode called rootOrthoNode which will never be culled. That way you could attach your GUI to the rootOrthoNode and never worry about odd Culls. Maybe there is better ways to do it but what do you think?

You can use fpsNode in SimpleGame.

Perfect! When I attached the JMEDesktop to the fpsNode the gui was no longer culled! The mouse was culled but that problem could be solved the same way by attaching it to the fpsNode as well. Wouldn't it be a good idea to implement that change to the TestJMEDesktop on the CVS?