【问题标题】:Disable graphic accelleration on CentOS 7 - Mesa Libraries在 CentOS 7 上禁用图形加速 - Mesa Libraries
【发布时间】:2017-06-29 09:24:30
【问题描述】:

我终于在 CentOS 7 机器上使用 OpenGL 成功编译了一个 Qt 应用程序 (C++)。该应用程序最初是为 Windows 开发的。

我有一个显示黑屏的 OpenGL 场景。如果我在 Windows 环境中使用 Windows 版本的 Qt 编译项目,它就可以工作。

除了我在 OpenGL 场景中看不到结果外,所有控件和功能都正常工作。经过几次搜索,我发现这可能是 3D 加速问题,并建议我尝试禁用它。

我在 CentOS 系统上使用 Mesa 库:

glxinfo | grep vendor
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: VMware, Inc.

我可以看到 3D 加速已开启:

glxinfo | grep rendering
direct rendering: Yes

如何禁用它?

【问题讨论】:

    标签: opengl 3d centos7 graphic mesa


    【解决方案1】:

    使用环境变量LIBGL_ALWAYS_SOFTWARE=1。它禁用硬件加速。来自 Mesa3D 文档:

    LIBGL_ALWAYS_SOFTWARE - 如果设置,则始终使用软件渲染

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-21
      • 1970-01-01
      • 2013-10-04
      • 2013-07-26
      • 2018-08-04
      • 2015-10-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多