linux - 如何在 Linux 中了解 OpenGL 版本并安装最新版本
问题描述
输出glxinfo | grep "OpenGL"
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.8
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 20.0.8
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.0.8
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
我不明白那个输出,
什么是版本?以及“OpenGL 版本字符串”和“OpenGL 核心配置文件版本字符串”有什么区别。
以及我应该升级我的 OpenGL 的 linux 命令
解决方案
要了解此命令的输出,您应该知道现代 OpenGL 实现支持多个配置文件。每个配置文件都包含完整 OpenGL 功能的一个子集。Profile可以通过不同的版本演变。
具体来说,您的系统支持三种配置文件:
- 核心配置文件:这是最现代的 OpenGL 配置文件。使用此上下文的应用程序可以访问最新的 OpenGL 功能,但不能访问传统的 OpenGL 功能,如立即模式(glBegin 和朋友)。您的系统有 4.6,这是当前最新的。
- 兼容性配置文件:此配置文件仍然支持传统的 OpenGL 功能,但也通过扩展支持一些较新的功能。您不应将其用于新应用程序,而应仅用于运行旧应用程序。
- OpenGL ES:此配置文件是为移动系统设计的,但也越来越多地用于桌面应用程序。将其视为 OpenGL 的一个小子集,它适用于不需要完整 OpenGL 工具包的应用程序。您拥有 OpenGL ES 3.2,它也是当前最新的。
总而言之:您的系统是最新的,您应该能够创建和运行使用核心或 ES 配置文件的现代 OpenGL 应用程序,以及使用兼容性配置文件的旧版 OpenGL 应用程序。
推荐阅读
- javascript - 如何在 javascript 中动态创建的另一个元素之上添加一个元素
- mocking - 如何在 Elixir 库 Ecto/Repo 中模拟/存根方法?
- vue.js - Vue Vuetify 打开对话框组件 onclick
- asp.net - 在 JS 中设置输入值时使用 AutoPostBack 不起作用
- django - django:传递所需变量后重定向回多模型视图
- javascript - 将唯一图像添加到 javascript 对象
- c# - UWP 获取唯一的 USB Pendrive ID
- sql - SQL 可以执行哪些操作,而包装 SQL 操作的 R 包不能?
- laravel - Laravel/PHPUnit:如何模拟方法(或构造函数控制器本身)的参数?
- mysql - MySQL查询具有不同字段的两个表