From 0a25bd4c4b75774de6970e6cf9e8e0c6c57eadec Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 9 Jul 2020 07:34:51 +0200 Subject: Support OpenGL over EGL This enables wayland with opengl contex. Change-Id: I4214cfaebb205c54394ef382cd58fbbcfdc5f1db Reviewed-by: Allan Sandfeld Jensen --- src/core/ozone/surface_factory_qt.cpp | 6 +++--- src/core/ozone/surface_factory_qt.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/ozone/surface_factory_qt.cpp b/src/core/ozone/surface_factory_qt.cpp index 5420b4809..f40aabc47 100644 --- a/src/core/ozone/surface_factory_qt.cpp +++ b/src/core/ozone/surface_factory_qt.cpp @@ -59,12 +59,12 @@ SurfaceFactoryQt::SurfaceFactoryQt() Q_ASSERT(qApp); #if defined(USE_GLX) if (GLContextHelper::getGlXConfig()) { - m_impl = gl::kGLImplementationDesktopGL; + m_impl = { gl::kGLImplementationDesktopGL }; m_ozone.reset(new ui::GLOzoneGLXQt()); } else #endif if (GLContextHelper::getEGLConfig()) { - m_impl = gl::kGLImplementationEGLGLES2; + m_impl = { gl::kGLImplementationDesktopGL, gl::kGLImplementationEGLGLES2 }; m_ozone.reset(new ui::GLOzoneEGLQt()); } else { qFatal("No suitable graphics backend found\n"); @@ -73,7 +73,7 @@ SurfaceFactoryQt::SurfaceFactoryQt() std::vector SurfaceFactoryQt::GetAllowedGLImplementations() { - return { m_impl }; + return m_impl; } ui::GLOzone* SurfaceFactoryQt::GetGLOzone(gl::GLImplementation implementation) diff --git a/src/core/ozone/surface_factory_qt.h b/src/core/ozone/surface_factory_qt.h index dee41d948..232f11e0f 100644 --- a/src/core/ozone/surface_factory_qt.h +++ b/src/core/ozone/surface_factory_qt.h @@ -53,7 +53,7 @@ public: std::vector GetAllowedGLImplementations() override; ui::GLOzone* GetGLOzone(gl::GLImplementation implementation) override; private: - gl::GLImplementation m_impl; + std::vector m_impl; std::unique_ptr m_ozone; }; -- cgit v1.2.3