Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render Avalonia into 3d textures using Skia with ANGLE backend #115

Open
tebjan opened this issue Jan 27, 2022 · 2 comments
Open

Render Avalonia into 3d textures using Skia with ANGLE backend #115

tebjan opened this issue Jan 27, 2022 · 2 comments
Labels
enhancement New feature or request VL.Stride Wrapper for 3d game engine Stride

Comments

@tebjan
Copy link
Member

tebjan commented Jan 27, 2022

existing implementation to check: https://github.com/TheKeyblader/Stridelonia

Avalonia Skia gpu setup:
https://github.com/AvaloniaUI/Avalonia/tree/master/src/Skia/Avalonia.Skia/Gpu

GPU implementation for WebGL as an example:
https://github.com/AvaloniaUI/Avalonia/blob/master/src/Web/Avalonia.Web.Blazor/BlazorSingleViewLifetime.cs
https://github.com/AvaloniaUI/Avalonia/blob/master/src/Web/Avalonia.Web.Blazor/BlazorSkiaGpu.cs

Also interesting for running skia with ANGLE:
mono/SkiaSharp#745
https://github.com/mono/SkiaSharp/tree/main/source/SkiaSharp.Views/SkiaSharp.Views.UWP/GlesInterop
https://hg.mozilla.org/mozilla-central/file/tip/gfx/gl/SharedSurfaceD3D11Interop.cpp

Step 2:
if we got Skia GPU images from a shared texture handle, we can also render 3d content into an Avalonia app.

@tebjan tebjan added the enhancement New feature or request label Jan 27, 2022
@tebjan tebjan changed the title Render Avalonia into 3d textures using Skia Render Avalonia into 3d textures using Skia with ANGLE backend Jan 27, 2022
@TheKeyblader
Copy link

TheKeyblader commented Feb 2, 2022

Avalonia already have code about angle
Some additional resources :
https://github.com/AvaloniaUI/Avalonia/tree/master/src/Windows/Avalonia.Win32.Interop
https://github.com/AvaloniaUI/Avalonia/tree/master/src/Avalonia.OpenGL/Angle

how to bind textures
https://github.com/microsoft/angle/wiki/Interop-with-other-DirectX-code

@joreg joreg transferred this issue from vvvv/VL.Stride Mar 1, 2023
@joreg joreg added the VL.Stride Wrapper for 3d game engine Stride label Mar 1, 2023
@bj-rn
Copy link
Contributor

bj-rn commented May 1, 2023

Avalonia also supports rendering with Direct2D. Wouldn't it make more sense to go that route? At least in my experience Skia tends to cause performance problems.
Found this video. It's pretty old so don't know if things are still the same / comparable, but judging from it Avalonia + Direct2d looks like a clear winner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request VL.Stride Wrapper for 3d game engine Stride
Projects
None yet
Development

No branches or pull requests

4 participants