On Mon, 04 Feb 2013 16:03:36 -0800, Linda Li wrote:
> (2)
> So from your explanation, my understanding is: for GLSL, if we use
> proprietary graphic card driver, we do not need to install any OpenGL
> libraries, as "it should just pass the source code directly to the
> driver"?
>
> But now I am confused about the difference between graphic card drivers
> and installed OpenGL libraries.
>
> If we have proprietary graphic card drivers, do we need to install mesa in
> Linux? If so (I think it is), why?
You need libGL.so, as that's what the application talks to. I.e. that's
where OpenGL programs like glUseProgram() are defined.
But libGL is basically just a conduit. It either encodes the commands as
GLX protocol and passes them to the X server, which then passes them to
the driver (indirect rendering), or it passes the commands directly to the
video driver (direct rendering).
Mesa provides both libGL and various open-source video drivers. Mesa's
libGL works with any of Mesa's drivers, as well as for indirect rendering.
Proprietary drivers often include a separate libGL, which may or may not
work with indirect rendering, and almost certainly won't work if you have
multiple video cards from different vendors and want to use them
simultaneously from the same process. Actually, just being able to switch
from one to the other without having to uninstall and reinstall drivers
isn't always straightforward.
On the plus side, proprietary versions of libGL tend to be ABI-compatible
with the Mesa version and each other, so you don't need separate versions
of each OpenGL-based program.