xamarin/urho

Multiple scenes

josuemnb opened this issue · 2 comments

i'm writing a 3d viewer.
I'm trying to use two scenes.
One for viewer and other for a previewer dialog window.
The dialog window with the onload stops the mainly urho-surface automatically.
But when closing the dialog, the main doesn't restores by itself.
What can be done?
Noticed also that the GC collects all the node from the main urho-surface.
Can it also be stopped?

hwd71 commented

I think multiple urho-scenes are ok, but multiple renderers are not. I have one full screen view, and I can put whatever I want wherever I want it, and overlay UI as required, sometimes entirely.

In terms of node management, bear in mind that if you remove a node, it is then invalid forever. If you want to move a node to another parent, just add it to the parent, and you're done; it's automatically removed from any other parent. If you want to hang onto it, then add it to an invisible "holder" node.

I"ve been able to use multiple renderers. For instance, I converted this sample to run on hololens https://urho3d.github.io/samples/09_MultipleViewports.html, and this sample also https://urho3d.github.io/samples/10_RenderToTexture.html

In fact, I converted nearly all the samples and the samply game. Problems I ran into included shadows, and some issues getting water to display (issues go back to pipeline and glsl to hlsl conversion of shaders), and in general weak shader conversions (not fully converted from glsl).