@jayfella not sure if there’s a specific thread for the jme-minimap you put on the store. Just wanted to see if you could help me out.
This works: addChild(new MiniMapState(((SimpleApplication) getApplication()).getRootNode(), 64, 200));
This does not work: addChild(new MiniMapState(new Node(), 64, 200));
Uncaught exception thrown in Thread[main,5,main]
IllegalStateException: Scene graph is not properly updated for rendering.
State was changed after rootNode.updateGeometricState() call.
Make sure you do not modify the scene from another thread!
Problem spatial name: null
I thought I could do new Node() to just get a blank scene for the minimap. What am I missing?
Why do you have a node in a mini map that you aren’t doing anything with?
Anyway, if you search on the forum for “managing viewports” or “viewport app state”, I suspect you will find hits. It comes up from time to time.
…or you are 5 seconds away from the JME source code at any time and can just look at what the application class does with root node… calling updateLogicalState() and updateGeometricState() every frame.
Please note there are also JME Tests out there. The error you had @asser_fahrenholz is just about “hey! this node was in render process! we throw error to you so you dont have artifacts trying render it somewhere else while its in render process(not done)” .
Generally im not sure if there is a wiki about it somewhere.
You can make SDK -> New project -> JME Tests -> search for render tests -> multiple views.
Anyway i was again curious if Wiki have something about it, but i was unable to find.
but it only mention about:
that do not have own Node, but use rootNode.
@mitm could be worth add to wiki about “custom scene graph managing” - what is IllegalStateException and caused by what. Also mention that if someone make own use of this, he need "node.updateLogicalState(tpf); node.updateGeometricState() " like Paul said.
It’s a bit of a catch 22. If you want to use anything available in the existing scene graph its update loop will already be managed. If not the user has to manage it.
But I can’t add a “rootNode” and manage it myself because you can only attach a scene to one node. If you attach a scene in the existing graph to mine it will detach it from the other.
In the end this is just an implementation of how to go about such a thing, and how to use a mask/overlay to style it. The code is licensed the same as the engine - and I encourage users to customise it to their needs if the situation arises.