-->

Run OpenGL programs on older hardware through mesa

2019-09-21 20:14发布

问题:

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 ?

回答1:

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)?

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

2. does it work on a virtual machine?

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).