1

I can't seem to get OpenGL 4.5 support on Ubuntu 19.04 with Intel Integrated Graphics. Completely new to working with OpenGL and I'm trying to run some existing code.

When attempting to run the OpenGL code in Python The RuntimeError is:

RuntimeError: 0:1(10): error: GLSL 4.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES

the rest of the post will be quite vague but my basic question is; how can I solve this?

If I understand correctly, your OpenGL version determines which versions of GLSL are supported. Your support for OpenGL is determined by the hardware, in which case you need to source the correct drivers.

My Intel CPU provides UHD Graphics 630 which (according to this page) should support OpenGL 4.5 with the appropriate drivers.

Screenshot of the table in case the link goes dead for some reason

On a fresh Ubuntu 19.04 installation glxinfo | grep "OpenGL version" returns OpenGL version string: 3.0 Mesa 19.0.8. Which I'm reading as "OpenGL Version 3.0 implementation provided by Mesa 19.0.8". In searching for a solution I found this post on askubuntu which provides instructions for upgrading the Intel graphics driver on Ubuntu using a ppa. Details are on that post but to upgrade to the new drivers it was:

sudo add-apt-repository ppa:oibaf/graphics-drivers

sudo apt update && sudo apt upgrade

Now glxinfo | grep "OpenGL version" gives me OpenGL version string: 3.0 Mesa 19.3.0-devel (git-ffb0d3a 2019-09-29 disco-oibaf-ppa) which appears to have a new Mesa version but OpenGL is still at version 3.0. That said, the full output of glxinfo | "OpenGL" I get:

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2) 
OpenGL core profile version string: 4.6 (Core Profile) Mesa 19.3.0-devel (git-ffb0d3a 2019-09-29 disco-oibaf-ppa)
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 19.3.0-devel (git-ffb0d3a 2019-09-29 disco-oibaf-ppa)
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.3.0-devel (git-ffb0d3a 2019-09-29 disco-oibaf-ppa)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

which shows a core profile version and core profile shading language version of 4.6? What are the differences between the core entries and the non-core entries in the terminal output above?

I can post the GLSL code but I don't think it'll be useful as it's not a code issue (I know this code runs fine on machines which have the correct OpenGL setup, the setup is the bit I'm struggling with!)

If there's problems with the question, please mark it as such and I'll attempt to address them. Any and all help appreciated. Thanks!

  • Firstly GLSL != GL and 4.50 != 4.5. That said, In your glxinfo output, you can see core profile version string is 4.6 and the shading language version string is 4.60 so it should be working. It seems whatever you are using is checking the versions incorrectly. – dobey Sep 30 at 16:01
  • When you create an OpenGL context in your application, be sure to create a core profile context, not compatibility, and you should be able to use OpenGL 4.5. – SurvivalMachine Sep 30 at 17:37
  • This was it, the version of pygame I was using was loading the compatibility version. – R. Mitchell Oct 1 at 14:42
0

Found the issue thanks to SurvivalMachine's comment above. The version of PyGame I was using (1.9.5) was creating the wrong type of context (compatibility) which didn't support GLSL 4.50. This is/was a known issue with PyGame and has been fixed as of PyGame 2.0.0 according to their github. To fix I updated to PyGame 2.0.0.dev3 which allows you to force the correct version of OpenGL to be used when creating the context. See this StackOverflow post (which links to the related github issue) for details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.