So far it was bound to whether we build for GLES. But this is
semantically wrong. It might be possible that even on desktop gl
epoxy is built without GLX support, thus we need to reflect this.
This change ensures that epoxy/glx.h is only included if available,
that relevant code is bound to it and that checks are in place to
enforce EGL if not build with glx support.
In addtion the glxbackend.cpp is now only included in the build set
if available.
It doesn't make much sense any more as we do no longer link EGL since the
switch to epoxy. And epoxy pulls it in at runtime if needed.
Even more on Wayland it's just plain stupid to have EGL disabled. So
removing the option just simplifies our code base without any
disadvantages.
REVIEW: 124695
The Egl backend is decoupled from the OpenGL ES build option which makes
it possible to use it as a replacement for glx.
To make this possible a new build flag is added when egl is available at
compile time and any egl specific code is now ifdefed with this flag
instead of the gles flag. In addition at runtime a windowing system enum
value is passed to the various detect methods to have egl/glx specific
detection for e.g. function pointer resolving.
By default egl is used if compiled with OpenGL ES, otherwise glx is used.
But in the non-gles case the windowing system can be selected through the
new environment variable KWIN_OPENGL_INTERFACE. Setting this variable to
"egl" the EglOnXBackend is used.
REVIEW: 106632
Due to changes in build system we have always either OpenGL or OpenGL ES.
This allows to remove the KWIN_HAVE_OPENGL_COMPOSITING define. In the
effects the define is kept as KWIN_HAVE_OPENGL which can be used in
future to build also an XRender only effect system.
Building the workspaces requires to have all the build dependencies
which were required for KWIN_HAVE_COMPOSITING to be set. This allows
us to remove all the ifdefs for this and gives us a cleaner code.
All OpenGL related files are build as a kwinglutils library for OpenGL
and as a kwinglesutils library for OpenGL ES. The appropriate defines
are set using target_properties and removed from kwinconfig.h.cmake.
Second part of cleaning up the lib directory: the effects library
now lives in libkwineffects/ directory.
For existing effects nothing changes as the install path is unchanged.
The change obsoletes the lib/ directory.
As glplatform.h has not yet been exported I dared to export it and
adjust the places where it is used.
CCMAIL: kwin@kde.org