如何在Windows上检测OpenGL的硬件加速 [英] How to Detect Hardware Acceleration for OpenGL on Windows

查看:492
本文介绍了如何在Windows上检测OpenGL的硬件加速的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有Win32 API调用来检测用户系统的当前硬件加速级别?我不需要更改设置,但是如果禁用了硬件加速,我想缩小我的OpenGL显示的细节级别.

Is there a Win32 API call that detects the current Hardware Acceleration level of a user's system? I have no need to change the setting, but I'd like to scale back the level of detail for my OpenGL display if hardware acceleration is disabled.

推荐答案

来自FAQ:我怎么知道我的程序正在Wintel卡上使用硬件加速?

如果使用的是Win32接口(而不是GLUT),请致电 DescribePixelFormat()并检查 返回dwFlags位域.如果 PFD_GENERIC_ACCELERATED清晰且 设置PFD_GENERIC_FORMAT,然后 像素格式仅受 通用实现.硬件 为此无法加速 格式.为了硬件加速,您 需要选择其他格式.

If you are using the Win32 interface (as opposed to GLUT), call DescribePixelFormat() and check the returned dwFlags bitfield. If PFD_GENERIC_ACCELERATED is clear and PFD_GENERIC_FORMAT is set, then the pixel format is only supported by the generic implementation. Hardware acceleration is not possible for this format. For hardware acceleration, you need to choose a different format.

这篇关于如何在Windows上检测OpenGL的硬件加速的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆