uno icon indicating copy to clipboard operation
uno copied to clipboard

OpenGL and/or Generic 3D View support

Open jeromelaban opened this issue 3 years ago • 11 comments

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.

  • [x] Support for Skia Desktop Windows
  • [x] Support for Skia Desktop X11
  • [x] Support for Skia Desktop macOS
  • [ ] Support for iOS Native
  • [ ] Support for Android Native
  • [x] Support for WinAppSDK
  • [ ] Support for Wasm Native

Why is this needed:

Render 3D content in apps.

For which Platform:

All available platforms, where ever OpenGL is supported.

jeromelaban avatar Aug 01 '22 20:08 jeromelaban

Has anything like this been added?

sbartolett3 avatar Jul 13 '23 19:07 sbartolett3

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 [email protected] please?

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.

sasakrsmanovic avatar Jul 13 '23 20:07 sasakrsmanovic

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

lindexi avatar Jun 17 '24 09:06 lindexi

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

anose001 avatar Jul 11 '24 08:07 anose001

@anose001 Copy buffer to WriteableBitmap will slowly.

lindexi avatar Jul 11 '24 08:07 lindexi

Bummer to hear that, but thank you

anose001 avatar Jul 11 '24 08:07 anose001

@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.

lindexi avatar Jul 11 '24 09:07 lindexi

@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?

anose001 avatar Jul 11 '24 09:07 anose001

@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

lindexi avatar Jul 11 '24 09:07 lindexi

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?

anose001 avatar Jul 11 '24 18:07 anose001

@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.

jeromelaban avatar Jul 12 '24 00:07 jeromelaban

Hey there — just a heads-up that this issue has been quiet for over a year. If there’s no update or comment in the next 10 days, it’ll be closed automatically. Feel free to remove the stale label or drop a note to keep it open.

github-actions[bot] avatar Oct 10 '25 00:10 github-actions[bot]

This is now supported with SKGLCanvas

MartinZikmund avatar Oct 14 '25 11:10 MartinZikmund