<p>The Mesa3D project is a software implementation of OpenGL; that is, an implementation that does all the rendering on the CPU with no GPU involvement at all. It's designed in two layers: a backend which renders each frame from some internal state, and a frontend which implements the OpenGL API and sets up the state for the backend to use. Most OpenGL implementations have a similar two-layer architecture, so that the same backend can be used by an OpenGL frontend, an OpenCL frontend, a Direct3D frontend, etc.</p>

<p>The open-source NVidia drivers (and most open-source drivers) use Mesa's frontend to provide the OpenGL API and a backend specific to that GPU. The OpenGL API is quite complicated to implement, so it makes sense for vendors to share an existing front-end in this way. However, closed-source drivers do not use Mesa's frontend and have their own closed-source frontend.</p>

<p>If you install and use a closed-source GPU driver, it will include its own libgl, which doesn't use Mesa at all. You don't need to install anything else to run OpenGL applications. (You might need an extra "-dev" package to get the header files needed to <em>compile</em> OpenGL applications.)</p>

<p>If you install and use an open-source GPU driver, it will use Mesa, but the packages in your distribution should have the dependencies set up correctly, so that if an external Mesa package is needed, it will be installed automatically.</p>

<p>Either way, you shouldn't have to worry about whether the OpenGL implementation you're using is based on Mesa or not.</p>

CC BY-SA 3.0
2017-11-08T13:41:36.453Z
2017-11-08T13:41:36.453Z
Dan Hulme
<p>The <a href="https://en.wikibooks.org/wiki/OpenGL_Programming/Installation/Linux" rel="nofollow noreferrer">wiki</a> says the following about using OpenGL on Linux:</p>

<blockquote>
  <p>Most Linux distributions rely on the Mesa3D project to provide their OpenGL implementation</p>
</blockquote>

<p>But it also says:</p>

<blockquote>
  <p>OpenGL is included in drivers, so you'll have to make sure drivers are properly installed if you want to enjoy programs using OpenGL. Open source drivers actually make use of Mesa's OpenGL implementation.</p>
</blockquote>

<p>So I am a little confused:</p>

<p>If I have an nVidia graphics card and install the nVidia drivers, do I need to install Mesa?</p>

<p>What if I have the card but do not install nVidia's drivers?</p>

<p>What, exactly, is meant by "implementation" in this context?</p>

<opengl>
If I have an nVidia graphics card on Linux, do I need Mesa or FreeGLUT or anything like that?
Startec
# If I have an nVidia graphics card on Linux, do I need Mesa or FreeGLUT or anything like that?

(Asked by: username_0 on 2017-11-06)

The [wiki](https://en.wikibooks.org/wiki/OpenGL_Programming/Installation/Linux) says the following about using OpenGL on Linux:

> Most Linux distributions rely on the Mesa3D project to provide their OpenGL implementation

But it also says:

> OpenGL is included in drivers, so you'll have to make sure drivers are properly installed if you want to enjoy programs using OpenGL. Open source drivers actually make use of Mesa's OpenGL implementation.

So I am a little confused:

If I have an nVidia graphics card and install the nVidia drivers, do I need to install Mesa?

What if I have the card but do not install nVidia's drivers?

What, exactly, is meant by "implementation" in this context?

**Tags:** opengl


---

## 1 answers

### Answer by username_1 on 2017-11-08. Score: 4 | Accepted answer

The Mesa3D project is a software implementation of OpenGL; that is, an implementation that does all the rendering on the CPU with no GPU involvement at all. It's designed in two layers: a backend which renders each frame from some internal state, and a frontend which implements the OpenGL API and sets up the state for the backend to use. Most OpenGL implementations have a similar two-layer architecture, so that the same backend can be used by an OpenGL frontend, an OpenCL frontend, a Direct3D frontend, etc.

The open-source NVidia drivers (and most open-source drivers) use Mesa's frontend to provide the OpenGL API and a backend specific to that GPU. The OpenGL API is quite complicated to implement, so it makes sense for vendors to share an existing front-end in this way. However, closed-source drivers do not use Mesa's frontend and have their own closed-source frontend.

If you install and use a closed-source GPU driver, it will include its own libgl, which doesn't use Mesa at all. You don't need to install anything else to run OpenGL applications. (You might need an extra "-dev" package to get the header files needed to *compile* OpenGL applications.)

If you install and use an open-source GPU driver, it will use Mesa, but the packages in your distribution should have the dependencies set up correctly, so that if an external Mesa package is needed, it will be installed automatically.

Either way, you shouldn't have to worry about whether the OpenGL implementation you're using is based on Mesa or not.


---

