I've been working on making it possible to set up two jme contexts, and have been successful thus far (assuming only one context actively renders). However, I've run into some issues with using Text. When the text node renders in any context after the first one created, the text displays as a big white box where the text should be (the box is the right size for the amount of text that should be rendered).
The text nodes are being set up in a pretty standard way (as follows):
// Initialize the text element
String id = "ID";
Text text = Text.createDefaultTextLabel( id + "-Label" );
text.setTextureCombineMode( TextureState.REPLACE );
text.setCullMode( SceneElement.CULL_NEVER );
text.print( "This is texty." );
// Initialize the node that will render the text element
textNode = new Node( id+"-Node" );
textNode.setRenderState( text.getRenderState( RenderState.RS_ALPHA ) );
textNode.setRenderState( text.getRenderState( RenderState.RS_TEXTURE ) );
textNode.attachChild( text );
textNode.setCullMode( SceneElement.CULL_NEVER );
textNode.updateGeometricState(0, true);
textNode.updateRenderState();
I've noticed a similar boxing issue over my text before, and the updategeometricstate/updaterenderstate solved that problem. However, the textnodes are being created separately (once in each context) and being updated the same way in each context.
Any thoughts why this could be happening?