如何从Winui3中的字节缓冲区渲染图形?

发布于 2025-02-10 21:37:56 字数 345 浏览 1 评论 0 原文

我通过以下方式接收实时图形数据:

void Data(ref UInt8[] buffer, UInt64 length);

如何通过C#在Winui3的窗口中显示此数据?

UWP中的课看起来很有希望,但我还没有找到同等的Winui。

来自

有什么想法吗?

I am receiving real time graphics data via:

void Data(ref UInt8[] buffer, UInt64 length);

How can I display this data in a Window in WinUI3 via C#?

The WritableBitmap class in UWP looks promising, but I haven't found a WinUI equivalent.

CanvasRenderTarget from the Win2D for WinUI3 library also sounds promising, but that library doesn't look stable yet.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

陈独秀 2025-02-17 21:37:56

如果Win2D对您来说足够好,那就是简单的方法。如果您想在某个时候进行较低级别的控制,则可以使用SharpDX或更好的选择,它是精神继任者涡流。它们是DirectX包装纸,可以输出Winui中的XAML Swapchainpanel。还有Terrafx,这是另一个DirectX包装器,它使用非标准,较低的C#,而无需匹配任何C#约定。这是最困难的选择,但是如果您需要更多的性能,可以使用。

SharpDX已退休,但非常稳定,并且已经使用了很多年了。

https://github.com/amerkoleci/amerkoleci/vortice.windows.windows

//sharpdx.org/“ rel =“ nofollow noreferrer”> http://sharpdx.org/

https://github.com/terrafx/terrafx.interop.windows

所有这些都可以作为Nuget软件包可用。

If Win2d is good enough for you that's the easy way. If you want lower level control at some point, you can use SharpDX or perhaps better, it's spiritual successor Vortice. They are DirectX wrappers that can output to the Xaml SwapChainPanel in WinUI. There is also TerraFX, another DirectX wrapper which uses non-standard, lower level C# without trying to match any C# conventions. It's the most difficult option, but it's available if you need a little bit more performance.

SharpDX is retired, but it's very stable, and has been in use for many years.

https://github.com/amerkoleci/Vortice.Windows

http://sharpdx.org/

https://github.com/terrafx/terrafx.interop.windows

All these are available as nuget packages as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文