Can you force an Immediate render update? #16357
-
I have a 3D scene and I am rendering some UI over it with Avalonia. The UI is simple shapes drawn with So I was wondering if there was some way I could force a Avalonia to do a render update immediately. And I don't be Let me know if anyone has any ideas. I don't minda bit of reflection if I need to. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Rendering is done on a separated render thread, it will be delayed either way.
With private API access, you can do at least this: var renderRoot = (IRenderRoot)window;
renderRoot.Renderer.Paint(Bounds); |
Beta Was this translation helpful? Give feedback.
Rendering is done on a separated render thread, it will be delayed either way.
If your 3D scene uses custom render timer, you might want to use ICustomDrawOperation (to access render thread and draw from there) + window.RequestAnimationFrame() (to get notification when next frame starts) instead. You also can see our GPU interop samples, if you want to go deeper.
With private API access, you can do at least this: