sepdiogpvsodvpasd
Posts: 1
Joined: Mon Feb 19, 2024 1:42 pm

OpenGLES 3+ in Raspberry pi 4 with Buster

Tue Feb 20, 2024 2:05 am

I have a Compute Module 4 with a carrier board, and, because of legacy software requirements, I am running Raspbian Buster. From what I understand, the SoC in the CM4 supports OpenGLES 3.0. However, I seem to only see the GLES2 library in /opt/vc/lib and /opt/vc/include.

How can I install the drivers for OpenGLES 3.0 with my setup?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 16130
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: OpenGLES 3+ in Raspberry pi 4 with Buster

Tue Feb 20, 2024 12:12 pm

opt/vc/lib is the very old firmware based 3D driver. Those aren't even applicable to BCM2711/Pi4/CM4.

As linked in that blog post, the 3D drivers are now part of the Mesa library, as they are for almost all Linux systems.
Whether the version of Mesa shipping with Buster is recent enough is anyone's guess.

Raspberry Pi no longer update the Buster repos (and haven't for probably 2 years), and Debian end LTS on it in June 2024, so you are STRONGLY recommended to look at updating.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

burtoogle
Posts: 39
Joined: Mon Dec 30, 2019 11:27 am

Re: OpenGLES 3+ in Raspberry pi 4 with Buster

Tue Feb 27, 2024 3:08 pm

Hi,

Not sure if this is useful but I provide a more recent Mesa release for use with my (buster compatible) Cura builds. These unpack into /opt/mesa and you can make your program use them by setting LD_LIBRARY_PATH to the appropriate lib directory (i.e. /opt/mesa/lib/aarch64-linux-gnu for the 64 bit version). You can find the Mesa builds at https://github.com/smartavionics/Cura/releases.

BTW, if you want to use geometry shaders, you have to override the GLES version because the real supported version is 3.1 but if you force the version to be 3.2 then geometry shaders are available. You force the version using an environment variable, i.e. MESA_GLES_VERSION_OVERRIDE="3.2".

Hope this helps.

Return to “Graphics programming”