User:ManDay/Deprecating the virtual OpenGL ebuild

This page discusses the solution to Bug 890334

Current situation and historical context
Packages which want to use Khronos' OpenGL rendering API also need an API for creating a rendering context in the windowing system. That API for creating a rendering context is called GLX for X11 and EGL for Wayland.

Historically, Mesa provided its implementation of OpenGL and GLX in a single library called libGL. Since the OpenGL functionality was thereby glued to X11 functionality, it was either libGL with OpenGL and GLX - and therefore dependence on X11 libraries - or nothing. There was no support for (full) OpenGL on X11-free systems, such as those running pure Wayland.

Since the emergence of GlVnd, an abstraction to provide OpenGL regardless of which implementation - such as Mesa - runs behind it, this is no longer true. OpenGL and GLX are now provided though GlVnd's abstraction as separate pieces, called libOpenGL and libGLX, respectively.

Resulting problems

 * 1) Currently, many packages which require in any, nonspecific way OpenGL or GLX depend on   without finer distinction. virtual/opengl, to satisfy all possible combinations, therefore pulls in   to guarantee the availability of GLX but, on the downside, requires X11, although it is often not needed.
 * 2) Further,  's original purpose to abstract away different OpenGL implementations is deprecated by GlVnd, which also extends to the abstraction of GLX, EGL, and GLES.

Resolution
Both problems will be adressed simultaneously. as a non-configurable middleman will be depreated in favour of depending on, which can be configured through USE-flags.