- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试确定我的 OpenGL 版本。我在 win10 主机上运行 Fedora 29 vmware guest。如果我使用软件渲染(通过 Mesa),我会得到
$ LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVE=softpipe glxinfo | grep OpenGL
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 7.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.3.6
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 18.3.6
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
为什么会报告 3.3(核心)和 3.1 两个版本?是因为对于 3.3,我只能获得核心兼容性,而对于 3.1,它可以是核心配置文件,也可以是兼容性配置文件?但是当我用要求 3.3(核心或兼容性配置文件)的代码(使用 freeglut)测试它时,我只能得到 3.1。我已经用 softpipe 和 llvmpipe 测试了代码。此外,以下代码中返回的配置文件始终为 0。
glutInitContextVersion(3, 3);
glutInitContextProfile(GLUT_CORE_PROFILE);
std::cout << "OpenGL version: " << glGetString(GL_VERSION) << '\n';
std::cout << "GLSL version: " << glGetString(GL_SHADING_LANGUAGE_VERSION)
<< '\n';
int major = 0;
int minor = 0;
int profile = 0;
glGetIntegerv(GL_MAJOR_VERSION, &major);
glGetIntegerv(GL_MINOR_VERSION, &minor);
glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &profile);
std::cout << "major:" << major << '\n'
<< "minor:" << minor << '\n'
<< "profile:" << profile << '\n';
那么为什么 glxinfo 在我无法请求时报告 3.3 核心(除了 3.1)?还是我读错了 glxinfo?
最佳答案
我知道这听起来有点傻,但是您已经在调用 glGetIntegerv 之前调用了 glutCreateWindow 对吗? (否则 GL 上下文将不存在,返回的上下文版本将为 0)。
核心为 3.3 而兼容性为 3.1 的主要原因是规范中的边缘情况。例如,实现遵循核心规范的顶点数组对象可能很容易,但可能需要更长的时间才能使其与古老的遗留功能(如编译的顶点数组、显示列表等)一起正常工作。
基本上对于驱动程序开发人员来说,支持核心配置文件所涉及的工作较少 - 兼容性配置文件本质上更难维护(这是决定引入核心配置文件的主要因素)。
关于c++ - 来自 glxinfo 的 opengl 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56896106/
我在做一些使用谷歌云平台的工作,也就是说我使用ssh登录。当我运行其他人的脚本(mayavi/test_drawline.py)时,它告诉我: ERROR: In /work/standalone-x
我正在尝试启动并运行一个非常基本的 openGL 应用程序。我有一个 GTX 770,我已经安装了 nvidia-361 驱动程序。当我运行 glxinfo | grep 版本,我得到: OpenGL
$ glxinfo | grep rend direct rendering: Yes OpenGL renderer string: Chromium “Chromium”在 glxinfo 的上下
在尝试打开它之前,我需要确保我的机器可以创建一个 D3D 窗口。我该怎么做? 最佳答案 您可能想看看 DeviceCaps .它应该能够告诉您设备的功能,这样您就不会尝试创建它不支持的窗口。 关于di
我正在尝试确定我的 OpenGL 版本。我在 win10 主机上运行 Fedora 29 vmware guest。如果我使用软件渲染(通过 Mesa),我会得到 $ LIBGL_ALWAYS_SOF
无法在模拟器中启动 AVD。输出:sh:1:glxinfo:未找到无法启动'.../sdk/tools/qemu/linux-x86/qem u-system-i386':没有那个文件或目录 最佳答案
我是一名优秀的程序员,十分优秀!