Page 1 of 1
Render on demand
Posted: 28 Oct 2016, 02:03
by elecman
I haven't looked at Noesis GUI for a while so excuse me if this is old news, but is it possible now to render on demand? So instead of wasting battery/CPU/GPU time, only render when something has changed?
Re: Render on demand
Posted: 28 Oct 2016, 12:45
by ai_enabled
Yes, that's possible. You have complete control over when NoesisGUI renders and where it renders.
Re: Render on demand
Posted: 28 Oct 2016, 22:15
by sfernandez
Hi,
Which SDK are you using: native C++, C# or Unity?
In C++ and C# SDK you decide when to call Render() to draw the UI, so you have total control.
In Unity there are 2 scenarios:
- If NoesisGUIPanel is attached to the main camera, then we render whenever Unity updates the main screen.
- If NoesisGUIPanel is attached to an object with a RenderTexture, then you can control when UI is rendered by enabling/disabling the object.
Re: Render on demand
Posted: 29 Oct 2016, 01:13
by elecman
I use Unity, using a render-texture in order to render to virtual "displays" in the scene.
But if I disable the object, the virtual screen will disappear as well, which kind of defeats the purpose. Or am I missing something?
Re: Render on demand
Posted: 31 Oct 2016, 16:32
by sfernandez
Hi,
You can have the object with the NoesisGUI component in a different layer and render it only when texture needs to be updated. This layer won't be rendered by the Main Camera, but you can apply the same texture to any other object included in the default layer and you will see the UI always there, even if you disable the NoesisGUI object from the other layer.
Do you understand what I mean?
Re: Render on demand
Posted: 31 Oct 2016, 18:03
by elecman
Yes, that makes sense. Thanks!
Re: Render on demand
Posted: 03 Nov 2016, 01:37
by jsantos
Anyway this is far from being an optimal solution. In v1.3 we are working to support this transparently if the user indicates that the content of the buffer is preserved from frame to frame. In that scenario we can avoid doing paints or just updating only the changed areas.
Re: Render on demand
Posted: 13 Nov 2016, 07:42
by nokola
This is awesome! +10 for render changed regions only.