[kinfocenter] Add support for OpenGL running on Wayland

Desktop / KDE / KDE Workspace - Martin Gräßlin [kde.org] - 4 March 2014 00:53 UTC

The X11 specific code is only executed on xcb platform. For detecting OpenGL on Wayland we don't do the native calls ourself, but use Qt functionality. We know that on Wayland Qt will use egl, so to simplify we can just use an QOpenGLContext. That code would also work for xcb, but Qt uses either glx or egl compile time switched, so it's easier to just keep the existing and working glx and egl implementation for X11.

As Qt makes it easy to request both core and compatibility profile we try all of that:
- normal (nothing specified)
- core
- compatibility

The X11 code should also be extended in that direction. Unfortunately I couldn't test it as the mesa version I'm currently running is only providing OpenGL 3.0.

REVIEW: 115952

8e9a61c [kinfocenter] Add support for OpenGL running on Wayland
kinfocenter/Modules/opengl/opengl.cpp | 138 +++++++++++++++++++++++++--------
1 file changed, 104 insertions(+), 34 deletions(-)

Upstream: quickgit.kde.org

  • Share