Okay, i already thought that this will get complicated, before code i want to share more details why i need this. Maybe someone knows a proper solution for my problem. So as some people maybe already know from other threads, i am developing on Android.
This means i need to use SDL to provide the necessary glue between my java stuff and my c++ code base. One drawback of using SDL is the ‘Only one window allowed’-philosophy.
Assume i have a process generating data which i stream into my scene, urho holds this data persistent as long as its session persist.
Assume now i have second use case in my app where i need a second SDLActivity with a different scene.
The only way to make this possible is to destroy the first Activity before starting the second one. But when i exit activity two i want to be able to switch back to activity one with its previous state. I already thought about resharing the GLSurfaceView aka SDLSurfaceView, but had no idea how to do that.
The problem is that everything is where i need it, the data are on the gpu before destroying the activity and this is fine. Start trying to copy it back to cpu just to hold the actual state of the scene seems like an overkill for me. We are talking about millions of vertices…
I hope this sketches out the whole problem, saving the complete scene like i wanted yesterday is not a proper solution i think.
IDEA:
Maybe i thought to complicated, i will try to use only one activity and hold 2 scenes in urho lifecycle. Then i switch between those scene in certain conditions, hope this will work.