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

How to use the backend of dynamic rendering? Ex: vulkan / metal / DirectX 12 #5428

Closed
zoujiaqing opened this issue Feb 5, 2021 · 2 comments

Comments

@zoujiaqing
Copy link

Skia support many rendering backends, such as how do vulkan、metal、D3D, call them in Avalonia?

macOS / iOS : metal
FreeBSD / Linux / Android : vulkan
Windows : DirectX

@MarchingCube
Copy link
Collaborator

Currently only OpenGL has a builtin support via OpenGlControlBase. You can also use raw Skia directly via custom drawing operations (ICustomDrawOperation) and this would allow you to interface with your backend of choice. Avalonia still does not give a builtin way of using Direct3D or Vulkan backends but you can provide it yourself via ISkiaGpu.

Actual interop also varies based on how do you implement your rendering, if you render to a texture and let Skia use it then it will be simpler than trying to setup a framebuffer from a control.

@maxkatz6
Copy link
Member

maxkatz6 commented Feb 1, 2023

See #9925
It's now possible to integrate directx and vulkan as well. Samples here https://github.com/AvaloniaUI/Avalonia/tree/master/samples/GpuInterop
Available in nightly, also will be part of 11.0-preview5 soon.

@maxkatz6 maxkatz6 closed this as completed Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants