简体   繁体   中英

How to get OpenGL 4 on Linux for Intel HD 4000

I am using Linux Mint 18.2 and I have an Intel HD Graphics 4000 from an Intel Core i5-3230M CPU.

I need to program in OpenGL 4.

Intel says that this GPU supports OpenGL 4.

However when i run glxinfo | grep "version" glxinfo | grep "version" I get the following:

server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 3.3
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL core profile version string: 3.3 (Core Profile) Mesa 12.0.6
OpenGL core profile shading language version string: 3.30
OpenGL version string: 3.0 Mesa 12.0.6
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 12.0.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

How can I get OpenGL 4 on my system?

The version of Mesa used by Linux Mint, even in its current release (18.2) is probably just too old to support the current versions of OpenGL (the version, 12.0.6, should, in fact, do OpenGL 4.3, but it still has to play together with the kernel driver, and it probably just doesn't do that well enough in that version).

I'd recommend Mesa 17.0.7 or newer. Mint doesn't ship that, and if you tried to install it, you'd have to recompile X.org / Wayland and a lot of other stuff.

So: Abandoning Mint sounds like your only choice at this point. Mint is a rather conservative distro (based on Ubuntu); go for Fedora 26 or 27; Arch Linux is also known for being pretty close to upstream.

CAVEAT : As @Fla points out below, you can actually circumvent the need to build yourself, as PPAs (external package repositories) exist with pre-compiled packages.

To bump your kernel

  • Open the Update Manager
  • Click View -> Linux Kernels
  • Select the most recent one and install it

If it is not recent enough for you, you can manage your kernels with Ukuu Kernel Update Utility.

To install ukuu

  • Open the Update Manager
  • Click Edit -> Software Sources
  • Click PPAs and "Add a new ppa"
  • Enter ppa:teejee2008/ppa
  • Install Ukuu with the software center or in a terminal run sudo apt update && sudo apt install ukuu
  • Use ukuu to manage your kernels

For Mesa, you also need a ppa. Like for ukuu, open the update manager and add a new ppa. The one for Mesa is ubuntu-x-swat/updates . Then search for new updates.

Once you've done that, you need to restart your computer and you will have the last version running.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM