I'm trying to utilize two separate worlds, one world is for the menu, the other is for the game.
My design is this:
-start the app
-load the menu world
-when 'start' is pressed, load another world
-go back to the original world when done
I created a class for the menu world, within that menu world I load another world on the fly, and redirect the main GLSurfaceView.Renderer OnFrame call to the game world.
I've ran into all kinds of problems. It's crashing when loading the game world, it always crashed on world.draw() for some reason. If I remove world.draw, the skymap renders ok but nothing else. If I remove all the object3D creations, draw.world works fine.
I tried using the same World both both the menu and game, but still have problems.
The confusing thing is, if I load the game world first, it works ok.
But anyway, ignore all that... Time to start fresh!
1. My main questions is, how do you handle two separate worlds correctly? Logically?
2. Do you need to dispose the first world then reload the second? Or can both worlds coexists side by side, redirecting the onFrame method to the current world?
3. Rather calling/loading a world from within a world (in terms of class files), would it be better to create a World Handler that disposes the current world before creating the new world, having each world in it's own class?
Any help is appreciated, thanks.