According to the OpenGL ABI for Linux GLX 1.3 is a minimum requirement.
Therefore we do not need to resolve the symbols which are present in that
version.
KWin did always require at least 1.3, for all the resolved functions
there were checks in the Scene, but they might have been incorrect.
Instead now the GLX version is checked and OpenGL compositing is blocked
if there is not at least GLX 1.3.
REVIEW: 106704
glBlendColor has been added to OpenGL 1.2 which means it is part of
the OpenGL ABI defined for Linux.
See http://www.opengl.org/registry/ABI/ section 3.4.
The macro GL_RESOLVE_WITH_EXT was fundamentally broken as it tried to
resolve a symbol first by it's name and then by the extension name if
the returned pointer is null.
From GLX spec:
"A non-NULL return value for glXGetProcAddress does not guarantee that an
extension function is actually supported at runtime. The client must also query
glGetString(GL EXTENSIONS) or glXQueryExtensionsString to determine if an
extension is supported by a particular context."
This macro is now reworked to be used only in case the symbol name does
not match our function name. E.g. glUniform1f vs glUniform1fARB.
The resolving itself also had quite some issues as:
* in same cases function pointers are not nulled
* in same cases only the arb or only the ext is checked
* in same cases the wrong extension is checked
This is now reworked to always check first the ARB extension if available
then the EXT extension and if both are not available the pointers are set
to NULL.
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
The EGL path had no support for presenting sub-regions of the screen, we can
leverage EGL_NV_post_sub_buffer for that. This wouldn't be a win if we didn't
have to opt-out of flipping.
REVIEW: 102889
EGL_KHR_image is a functional superset of both EGL_KHR_image_base and
EGL_KHR_image_pixmap, which were split off later to allow the former to be
more modular. Older drivers might only expose EGL_KHR_image if they were
released before the split happened.
REVIEW: 102879
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