Sergio0694 / ComputeSharp

A .NET library to run C# code in parallel on the GPU through DX12, D2D1, and dynamically generated HLSL compute and pixel shaders, with the goal of making GPU computing easy to use for all .NET developers! 🚀
MIT License
2.75k stars 123 forks source link

Update Win2D sample to use WinAppSDK's 'AppWindow' and new APIs #845

Closed Sergio0694 closed 2 months ago

Sergio0694 commented 2 months ago

Description

This PR uses the new Win2D APIs from https://github.com/microsoft/Win2D/issues/924 to greatly simplify the Win2D sample app. In particular, it replaces all manual Win32 interop with just AppWindow, and uses the new CreateForWindowId API to create the CanvasSwapChain instance.