如何从.NET 获取像素着色器版本?

发布于 2024-08-08 09:30:13 字数 123 浏览 3 评论 0原文

我正在编写一个 WPF 应用程序,需要显示有关系统中安装的显卡的信息。我遇到了一个问题,即我无法获得当前显卡支持的像素版本。我如何使用 .NET 来做到这一点? (导入外部代码,可能是 DirectX 库,也是一个合适的解决方案)。

I am writing a WPF application and need to show info about video card installed in the system. I've faced a problem that I can't get pixel version supported by current video card. How can I do this using .NET? (importing of external code, may be DirectX libs, is also a suitable solution).

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

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

发布评论

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

评论(1

秋千易 2024-08-15 09:30:13

WPF 本身仅通过 RenderCapability.Tier 属性此处详细描述了各层,但只要您在第 2 层,您可以使用像素着色器。但是,第 2 层实际上仅代表 DX9 或更高版本可用,因此您应该避免使用除此之外的任何像素着色器功能。也许在 WPF4 中他们添加了另一层或更多细节,但我目前手头没有 .NET 4 VM 可供检查。

除此之外,您可能还可以使用 Managed DirectX,它现在是 XNA 框架,获取较低级别的信息。

WPF itself only offers basic information about the capabilities of the system via the RenderCapability.Tier property. The tiers are described here in detail, but as long as you're at tier 2 you can use pixel shaders. However, tier 2 only really represents that DX9 or higher is available, so you should avoid using any pixel shader functionality beyond that. Maybe in WPF4 they've added another tier or more details, but I don't have my .NET 4 VM handy at the moment to check.

Beyond that, you could probalby use Managed DirectX, which is now the XNA Framework, to get at lower level information.

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