Selym
Posts: 2
Joined: Fri Feb 23, 2018 3:17 am

Which library do I use?

Fri Feb 23, 2018 3:32 am

Hello. I want to develop using OpenGL ES to make use of the ability to use zero-copy textures from MMAL that the regular OpenGL implementation does not appear to have. There seem to be multiple OpenGL ES libraries that I can link to though. There are two that come preinstalled: /opt/vc/lib/libbrcmGLESv2.so and /opt/vc/lib/libGLESv2.so. Are these both just the same Broadcom library with different filenames? Also there is the Mesa one you can get from installing libgles2-mesa-dev. Which of these do I link to? Thank you.

User avatar
topguy
Posts: 4914
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Which library do I use?

Fri Feb 23, 2018 9:52 am

Stay very clear of the the mesa libraries at least.

if you do a "ls -l /opt/vc/lib" are they actually two different files or are "libGLESv2.so" just a link to the new name ?

Selym
Posts: 2
Joined: Fri Feb 23, 2018 3:17 am

Re: Which library do I use?

Fri Feb 23, 2018 2:56 pm

There is only one symbolic link; libGLESv1_CM.so is linked to libGLESv2.so. libbrcmGLESv2.so and libGLESv2.so are not symbolically linked, but they have the same file size, so I am guessing they are copies. I'll link to libbrcmGLESv2.so since it seems to be more specific. Thank you for confirming to not use the Mesa libraries. Someone had made a post saying to use the Mesa libraries over the Broadcom ones because were newer and thus should replace the Broadcom libraries, but I'll take it that they were mistaken. The Broadcom libraries are working fine, albeit with no X11 support.

Return to “OpenGLES”