diff options
author | James McDonnell <jmcdonnell@blackberry.com> | 2019-12-05 12:12:37 -0500 |
---|---|---|
committer | James McDonnell <jmcdonnell@blackberry.com> | 2020-01-13 11:50:21 -0500 |
commit | 5a66bc64b0b157929c9fc76f0f4ae046393be600 (patch) | |
tree | 982af2ecd7f8d64cca36e4390b485ebe381eee12 /src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp | |
parent | da13b1b130f520ee0bd9df0e9190db64a2ea4a93 (diff) | |
download | qtwayland-5a66bc64b0b157929c9fc76f0f4ae046393be600.tar.gz |
Enable QtWayland for QNX
Make EGL 1.5 with EGL_PLATFORM_WAYLAND_EXT a requirement for QNX and
add some EGL 1.5 code alternatives. Avoids the need to deal with
incompatibility problems between the QNX native display/window type
and Wayland display/window type.
Change-Id: Ib26a020e1f8c7f570c6af08697d8c8153c887294
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Dan Cape <dcape@qnx.com>
Diffstat (limited to 'src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp')
-rw-r--r-- | src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp index 7679a5fb..8ea8e109 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp +++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp @@ -346,7 +346,11 @@ void QWaylandGLContext::updateGLFormat() wl_surface *wlSurface = m_display->createSurface(nullptr); wl_egl_window *eglWindow = wl_egl_window_create(wlSurface, 1, 1); - EGLSurface eglSurface = eglCreateWindowSurface(m_eglDisplay, m_config, eglWindow, 0); +#if defined(EGL_VERSION_1_5) + EGLSurface eglSurface = eglCreatePlatformWindowSurface(m_eglDisplay, m_config, eglWindow, nullptr); +#else + EGLSurface eglSurface = eglCreateWindowSurface(m_eglDisplay, m_config, eglWindow, nullptr); +#endif if (eglMakeCurrent(m_eglDisplay, eglSurface, eglSurface, m_context)) { if (m_format.renderableType() == QSurfaceFormat::OpenGL |