unoplatform / uno

Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
https://platform.uno
Apache License 2.0
8.64k stars 698 forks source link

OpenGL and/or Generic 3D View support #9405

Open jeromelaban opened 1 year ago

jeromelaban commented 1 year ago

What would you like to be added:

An OpenGL and/or Generic 3D view which supports the ability to use 3D primitives, exposed through Silk.NET, for instance.

Why is this needed:

Render 3D content in apps.

For which Platform:

All available platforms, where ever OpenGL is supported.

sbartolett3 commented 1 year ago

Has anything like this been added?

sasakrsmanovic commented 1 year ago

Hello - we prioritize the roadmap based on volume of community requests or based on paid client support requests, a process described here https://platform.uno/blog/sustaining-the-open-source-uno-platform/ . It would be great to understand your timelines and needs - would you mind reaching out at info@platform.uno please?

Uno Platform
Sustaining the Open-Source Uno Platform
Uno Platform is free and Open Source (Apache 2.0). We explain and document our sustainability model here so it is easily referenceable.
lindexi commented 4 weeks ago

After https://github.com/unoplatform/uno/issues/15166 , we can draw 3D to OpenGL and then draw OpenGL to Skia.

anose001 commented 5 days ago

@lindexi, @jeromelaban, will this be implemented by copying to the buffer of a WriteableBitmap or rather having some sort of GpuInterop implementation?

lindexi commented 5 days ago

@anose001 Copy buffer to WriteableBitmap will slowly.

anose001 commented 5 days ago

Bummer to hear that, but thank you

lindexi commented 5 days ago

@anose001 After https://github.com/unoplatform/uno/issues/15166 , we can use the UI drawing Skia surface to render anything. And it means that we can skip the buffer copy to WriteableBitmap.

anose001 commented 5 days ago

@lindexi, very cool to hear that. Looking forward to give this a try once this is out on a nightly build or so. Do you know if this is a matter of weeks or months?

Also, will this be constrained to OpenGL on desktop or will other platforms (android, iOS, etc) be able to draw to a SkiaVisual via their own graphics APIs?

lindexi commented 5 days ago

@anose001 I use the hack way to do this now, see https://github.com/unoplatform/uno/discussions/17083 and https://github.com/unoplatform/uno/discussions/15097#discussioncomment-8301556

anose001 commented 5 days ago

Also, will this be constrained to OpenGL on desktop or will other platforms (android, iOS, etc) be able to draw to a SkiaVisual via their own graphics APIs?

To answer my above question, it looks like this here says SkiaVisual will only be available for Skia Desktop net8.0-desktop. Really curious to see how well this will work on macOS since they have discontiuned OpenGL support. Nonetheless, a very welcoming development.

@lindexi, is an ANGLE implementation for mobile support considerably more work to implement this functionality?

jeromelaban commented 5 days ago

@anose001 net8.0-desktop is supported on macOS, and macOS still supports OpenGL even if it's discontinued. ANGLE is a consideration for supporting targets that do not provide OpenGL at all, or severely limited.