When I stick a quad in ortho mode it always renders on top of FengGUI - can someone tell me how to get it to render underneath FengGUI?
Here is a picture of the problem:
www.shadowquest.net/images/gui_error.jpg
I am not sure if it applies to you… but I think it might so here is a little question and answer on a similar topic:
I have added FengGui game state to my project and it works fine, but renders under the other game state. I have tried adding the FengGui gamestate first and last, and it doesn't matter?
It doesn't render 'after' because you need to flush the queue, call Renderer.renderQueue(), after the first pass finishes. If you have an InGameState and a GUIGameState, you need to put the statement after all your code in the InGameState render method:
DisplaySystem.getDisplaySystem().getRenderer().renderQueue();
You need to flush the queue at the end of your IngameGameState render method. The FengGUI GameState needs to be added after the IngameGameState. If this doesn't work, try clearing the Zbuffer after rendering (in IngameGameState.render) with Renderer.clearZBuffer, then it SHOULD work if the GameStates are rendered in the correct order.
Hope it helps
sGame.getDisplay().getRenderer().clearZBuffer();
Wow. After much fighting with FengGUI trying to get it on top of JME's ortho plane, rederer.renderQueue() finally did the trick. I'm doing it in a render pass, so I had to put it after drawing the rootNode but before the render pass. Thanks!