Draw over a canvas with a custom GL renderer?
Hi there -
I'm exploring porting my existing UI over to Noesis. A big part of my application involved drawing and updating in real-time many oscilloscope traces with potentially a few thousand points in each trace. My current implementation works with a custom unity OnRenderObject call and aligning the GL matrices appropriately to the UI space before drawing lines directly with GL calls. In the future I may want to migrate to something even more performance (e.g. vertex shaders).
I have prototyped something similar with Noesis using OnRender and DrawingContext.Line which is very convenient, but the performance is not comparable. I'm now faced with merging my old solution to align with Noesis's rendering.
My questions:
- is this the best way to approach the problem?
- are there any tricks or examples in aligning my custom render with e.g. a blank Noesis canvas?
I realize a render texture could work but that introduces other constraints I'm not wild about.
Please forgive me if this is covered somewhere in the docs or other forum topics, I've been searching and tinkering for a few hours now, and its my first day with Noesis. Love it so far, big step up from my current solution in all other respects!
Thanks,
Daniel
I'm exploring porting my existing UI over to Noesis. A big part of my application involved drawing and updating in real-time many oscilloscope traces with potentially a few thousand points in each trace. My current implementation works with a custom unity OnRenderObject call and aligning the GL matrices appropriately to the UI space before drawing lines directly with GL calls. In the future I may want to migrate to something even more performance (e.g. vertex shaders).
I have prototyped something similar with Noesis using OnRender and DrawingContext.Line which is very convenient, but the performance is not comparable. I'm now faced with merging my old solution to align with Noesis's rendering.
My questions:
- is this the best way to approach the problem?
- are there any tricks or examples in aligning my custom render with e.g. a blank Noesis canvas?
I realize a render texture could work but that introduces other constraints I'm not wild about.
Please forgive me if this is covered somewhere in the docs or other forum topics, I've been searching and tinkering for a few hours now, and its my first day with Noesis. Love it so far, big step up from my current solution in all other respects!
Thanks,
Daniel
Re: Draw over a canvas with a custom GL renderer?
For 3.1 we optimized DrawingContext.Line but there is still room for improvement. That's something we want to do. A much faster alternative is using MeshGeometry. This sends the geometry directly to the GPU. The only problem with this approach is that it doesn't support anti-aliasing. Not sure how inconvenient this is, but we also have plans to improve it too.
Could you give it a try?
Could you give it a try?
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest