如何判断 OpenGL 上下文是否是硬件加速的?

发布于 2024-09-09 09:00:05 字数 289 浏览 2 评论 0原文

我知道,如果 OpenGL 实现找不到合适的驱动程序,它会很高兴地退回到用软件渲染所有内容。它对于图形应用程序很有用,但对于计算机游戏来说是不可接受的。

我知道许多用户使用 Windows XP,如果用户没有为其 GPU 安装显卡驱动程序,那么 OpenGL 将不会进行硬件加速(而 DirectX 会进行硬件加速,否则会抛出错误)。

有没有比测量 FPS 更好(并且可能是跨平台)的方法来确定 OpenGL 是否使用硬件加速,以及如果它太低则通知用户?

我知道像 Quake3 这样的游戏可以以某种方式找到它......

I know that if the OpenGL implementation does not find a suitable driver it happily falls back to rendering everything in software. It's good for graphics applications but it is not acceptable for computer games.

I know many users using Windows XP and if the user does not install the video card driver for his GPU then the OpenGL won't be hardware accelerated (while DirectX is or if not it will throw errors).

Is there a better (and possibly cross-platform) way to determine if OpenGL uses the hardware acceleration than measuring the FPS and if it's too low notify the user?

I know that games like Quake3 can find it out somehow...

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

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

发布评论

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

评论(3

蓝戈者 2024-09-16 09:00:05

似乎没有直接的方法来查询 OpenGL,但有一些方法可以帮助您确定是否存在硬件加速。有关 Windows 的想法,请参阅此处。在 UNIX 环境中 glxinfo | grep“直接渲染”应该可以工作。

It seems that there is no direct way to query OpenGL for this but there are some methods that may help you to determine if hardware acceleration is present. See here for Windows ideas. In a UNIX environment glxinfo | grep "direct rendering" should work.

梦幻的味道 2024-09-16 09:00:05

前面的答案表明,检查用户是否只有 OpenGL 1.1 可能就足够了。

如何编写检查 openGL 支持的安装程序?< /a>

This previous answer suggests that checking to see if the user only has OpenGL 1.1 may be sufficient.

How to write an installer that checks for openGL support?

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