本文介绍了通过mesa在较旧的硬件上运行OpenGL程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



显然在windows上,这是行不通的因为这些驱动程序没有更新。然而,我听说过Mesa以及它如何为大多数Opengl函数提供软件实现。

所以我有两个问题:


  1. 如果我安装了一个带有mesa 9.0的Linux发行版,我将能够编译和运行新的opengl程序(需要opengl 3.2)吗? (不需要硬件加速

  2. 它可以在虚拟机上运行吗?


解决方案

如果您的计算机中的GPU实际上受到Mesa的开源驱动程序的支持,那么Mesa将退回到那些GPU可以执行的操作。

b
$ b

如果你真的想要软件光栅化模式,那么是的,在虚拟机上这样做是可行的。我全部用于Linux和开放源代码,但是预制的Mesa DLL二进制文件名为 opengl32。 dll 。如果你把它放在同一个目录下,你要运行它,它将使用Mesa的软件光栅化器。请不要替换系统的opengl32.dll




I need to install OpenGL3.X on several computers whose graphics card might not support versions above 2.0 for teaching purposes.

Apparently on windows, that doesn't work as there are no updates for the drivers. However i have heard about Mesa and how it provides a software implementation for most of the Opengl functions.

So i have 2 questions:

  1. If i installed a Linux distribution with mesa 9.0, will i be able to compile and run new opengl programs (requiring opengl 3.2) ? (hardware acceleration is not required
  2. does it work on a virtual machine ?
解决方案

If the GPUs in your computers are actually supported by the open source drivers of Mesa, then Mesa will drop back to whatever those GPUs can do

If you really want software rasterization mode, then yes, doing it on a VM will work. I'm all for Linux and open source, but there are pre-built binaries of the Mesa DLLs, named opengl32.dll. If you place that in the same directory as the executable you want to run this with, it will use Mesa's software rasterizer. Please don't replace the system's opengl32.dll

However: Using OpenGL-3 without proper HW support is no fun. And you can get OpenGL-3 capable GPUs for the cheap today. They're not fast, but for about 30$ you get at least all the HW capabilities and it will always be faster than any software rasterizer (except if you run that on a Xeon Phi, but that would be not economical – for the price of a Xeon Phi you can get 3 GeForce GTX 690).

这篇关于通过mesa在较旧的硬件上运行OpenGL程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 15:32