c++ - 在 Mac 上的 Ubuntu VM 上使用 Mesa/OpenGL 4.5 进行软件渲染

标签 c++ macos ubuntu opengl mesa

作为我学习的一部分,我必须能够编译和运行基于 OpenGL 4.5 的程序,而我只有一台 Mac 可以这样做。我在 VM 中使用 Ubuntu 以获得更加编程友好的环境,但我的软件和硬件(macOS Sierra 10.12.6,Intel HD Graphics 4000)仅限于 3.3 上下文。这是附加信息(从 Ubuntu VM 运行):

$ glxinfo | grep 'OpenGL core'
OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.0.5
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:

作业使用 GLFW。我一直试图让它在软件渲染中使用 Mesa(它与 llvmpipe 一起使用),以便它独立于硬件功能(如果我理解正确的话),但是当我尝试创建一个窗口时,窗口创建总是失败4.5 上下文。我环顾四周并尝试使用 export LIBGL_ALWAYS_SOFTWARE=1 无济于事。构建链使用 CMAKE 来构建作业和实际的 GLFW 库,这是值得的(我注意到它使用 X11 和 xorg-dev 包)。

Mesa 是否实现了任何版本的 OpenGL 4?如果是这样,我能否在 GLFW 部分强制进行软件渲染,以便我可以创建 OpenGL 4.x 上下文?

最佳答案

Does Mesa implement any version of OpenGL 4 ?

他们的 Intel 和 Radeon 硬件驱动程序 do .

... can I force software rendering on GLFW's part so that I can create an OpenGL 4.x context ?

不,Mesa 的所有软件渲染器 ( softpipe, llvmpipe, & swr ) 都在 OpenGL 3.3 上达到顶峰。

As of Mesa 20.2 llvmpipe supports OpenGL 4.5 .

关于c++ - 在 Mac 上的 Ubuntu VM 上使用 Mesa/OpenGL 4.5 进行软件渲染,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52770078/

相关文章:

PHP PDO 返回 bool false 排序

eclipse - Eclipse中选项卡的深色背景

c++ - QT5.5 中用于 qDebug() 的新 QFlags 助手的问题

c++ - 使用 pthread_create 从线程调用类成员函数

c++ - 为什么模板只能在头文件中实现?

swift - 从 NSWindowController 以编程方式呈现 View Controller

objective-c - 如何注销 Mac 应用程序帮助手册

c++ - 多次调用 make_shared() 时的 shared_ptr 垃圾回收

python - Mavericks 上的 Django 和 mysql 问题

ubuntu - 在 Ubuntu localhost 上安装 Joomla 扩展