summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2020-07-09 07:34:51 +0200
committerMichal Klocek <michal.klocek@qt.io>2020-07-30 16:44:02 +0200
commit0a25bd4c4b75774de6970e6cf9e8e0c6c57eadec (patch)
tree2706d00f6aea58074353f9e49bb98e885cd3440d /src/core
parentc60f056562aaba4afeb150c87ed73bc5a4e424d7 (diff)
Support OpenGL over EGL
This enables wayland with opengl contex. Change-Id: I4214cfaebb205c54394ef382cd58fbbcfdc5f1db Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ozone/surface_factory_qt.cpp6
-rw-r--r--src/core/ozone/surface_factory_qt.h2
2 files changed, 4 insertions, 4 deletions
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<gl::GLImplementation> 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<gl::GLImplementation> GetAllowedGLImplementations() override;
ui::GLOzone* GetGLOzone(gl::GLImplementation implementation) override;
private:
- gl::GLImplementation m_impl;
+ std::vector<gl::GLImplementation> m_impl;
std::unique_ptr<ui::GLOzone> m_ozone;
};