Avalonia - SharpDX Demo/POC -- 2
Budget: $250 – $750 USD
Avalonia has SharpDX support for rendering to a swap chain and compositing it into the visual tree. The existing sample application for this is out of date, targeting .NET Framework, and using the long deprecated paml format for it's XAML content.
I am looking to explore the how to of host realtime DirectX content in Avalonia while being able to composite XAML controls on top of it. I am looking for a POC that demonstrates the techniques needed to achieve this. Use of a swap chain to allow decoupling between Avalonia's UI thread and the DirectX rendering is a must.
Technological Requirements
- Avalonia
- .NET Core 6
- C# Latest
- ANY CPU or 64bit (I need 64bit support, I'm ok if ANY CPU is compatible but also fine if only x64 works)
- Minimum OS - Windows 10
- SharpDX as the mechanism for interacting with DirectX
- Support for DirectX 11 or newer
Demo Requirements
- Avalonia displays the buffered content from the swap chain
- The DirectX content (being interacted with via SharpDX) runs on it's own separate thread entirely independent of Avalonia's UI thread. It sends presents its output to the swap chain.
- Normal XAML controls be visually composited on top of the swap chain's location in the visual tree.
- DirectX scene should consist of a basic spinning cube and an indicator of what frame it is on that just increments by 1 each frame. Should target a normal 60 FPS
- Avalonia's UI thread artificially slowed down to ~15FPS. This is imperative to both confirm that the DirectX rendering occurs independent of Avalonia, and that the swap chain is presented to the desktop at whatever rate it is available at, even if the rest of the UI has slowed down.
Some basic visual layering verifications to prove in the POC
- A small (smaller than the swap chain) rectangle is entirely on top of the swap chain and is visible without interfering with the swap chain.
- A small rectangle is entirely behind the swap chain and cannot be scene at all. It is correctly fully obscured
- A small rectangle partially overlaps on top the swap chain and is entirely visible.
- A small rectangle partially is behind the swap chain, and only the parts behind it are obscured.
I need to know if this is or isn't possible. If it is possible code showing how to do it. If it isn't possible, code and images showing what happens in this case.
- A small rectangle overlayed on top of the swap chain with a transparent or semitransparency applies correct alpha blending with the swapchain's content.
- DirectX frame number should be rendered via DirectX and be part of the render target presented to the swap chain. This should not but achieved via XAML. This is important for being able to see how Avalonia behaves with dropping/skipping frames presented to it from a swap chain.
I am looking to explore the how to of host realtime DirectX content in Avalonia while being able to composite XAML controls on top of it. I am looking for a POC that demonstrates the techniques needed to achieve this. Use of a swap chain to allow decoupling between Avalonia's UI thread and the DirectX rendering is a must.
Technological Requirements
- Avalonia
- .NET Core 6
- C# Latest
- ANY CPU or 64bit (I need 64bit support, I'm ok if ANY CPU is compatible but also fine if only x64 works)
- Minimum OS - Windows 10
- SharpDX as the mechanism for interacting with DirectX
- Support for DirectX 11 or newer
Demo Requirements
- Avalonia displays the buffered content from the swap chain
- The DirectX content (being interacted with via SharpDX) runs on it's own separate thread entirely independent of Avalonia's UI thread. It sends presents its output to the swap chain.
- Normal XAML controls be visually composited on top of the swap chain's location in the visual tree.
- DirectX scene should consist of a basic spinning cube and an indicator of what frame it is on that just increments by 1 each frame. Should target a normal 60 FPS
- Avalonia's UI thread artificially slowed down to ~15FPS. This is imperative to both confirm that the DirectX rendering occurs independent of Avalonia, and that the swap chain is presented to the desktop at whatever rate it is available at, even if the rest of the UI has slowed down.
Some basic visual layering verifications to prove in the POC
- A small (smaller than the swap chain) rectangle is entirely on top of the swap chain and is visible without interfering with the swap chain.
- A small rectangle is entirely behind the swap chain and cannot be scene at all. It is correctly fully obscured
- A small rectangle partially overlaps on top the swap chain and is entirely visible.
- A small rectangle partially is behind the swap chain, and only the parts behind it are obscured.
I need to know if this is or isn't possible. If it is possible code showing how to do it. If it isn't possible, code and images showing what happens in this case.
- A small rectangle overlayed on top of the swap chain with a transparent or semitransparency applies correct alpha blending with the swapchain's content.
- DirectX frame number should be rendered via DirectX and be part of the render target presented to the swap chain. This should not but achieved via XAML. This is important for being able to see how Avalonia behaves with dropping/skipping frames presented to it from a swap chain.