diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-01-10 21:34:39 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-01-10 21:34:39 +0100 |
commit | 8a638d510db90364cef990e770b84f372bde9f6b (patch) | |
tree | dbb3833a7e0c1011036ed43987d56b6874a70cbe /examples | |
parent | 88af49bdfe4e87d1832240a65d842e9126b7bb63 (diff) | |
parent | 1e29215b2e40a38b9324a719888749e12a74e99c (diff) | |
download | qtwayland-8a638d510db90364cef990e770b84f372bde9f6b.tar.gz |
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
.qmake.conf
Change-Id: I5f8ba96b550b6d326a097fce33863caed01c05d1
Diffstat (limited to 'examples')
-rw-r--r-- | examples/wayland/minimal-cpp/compositor.cpp | 1 | ||||
-rw-r--r-- | examples/wayland/minimal-cpp/main.cpp | 1 | ||||
-rw-r--r-- | examples/wayland/minimal-cpp/window.cpp | 1 | ||||
-rw-r--r-- | examples/wayland/minimal-cpp/window.h | 4 | ||||
-rw-r--r-- | examples/wayland/qwindow-compositor/main.cpp | 1 | ||||
-rw-r--r-- | examples/wayland/qwindow-compositor/window.cpp | 1 |
6 files changed, 7 insertions, 2 deletions
diff --git a/examples/wayland/minimal-cpp/compositor.cpp b/examples/wayland/minimal-cpp/compositor.cpp index 81b1be26..fa9ae2da 100644 --- a/examples/wayland/minimal-cpp/compositor.cpp +++ b/examples/wayland/minimal-cpp/compositor.cpp @@ -88,6 +88,7 @@ Compositor::Compositor(Window *window) : m_window(window) { window->setCompositor(this); + connect(window, &Window::glReady, this, [this] { create(); }); } Compositor::~Compositor() diff --git a/examples/wayland/minimal-cpp/main.cpp b/examples/wayland/minimal-cpp/main.cpp index 0b0b4b9d..226e8923 100644 --- a/examples/wayland/minimal-cpp/main.cpp +++ b/examples/wayland/minimal-cpp/main.cpp @@ -59,7 +59,6 @@ int main(int argc, char *argv[]) Window window; window.resize(800,600); Compositor compositor(&window); - compositor.create(); window.show(); return app.exec(); diff --git a/examples/wayland/minimal-cpp/window.cpp b/examples/wayland/minimal-cpp/window.cpp index f345bd51..f32fb515 100644 --- a/examples/wayland/minimal-cpp/window.cpp +++ b/examples/wayland/minimal-cpp/window.cpp @@ -68,6 +68,7 @@ void Window::setCompositor(Compositor *comp) { void Window::initializeGL() { m_textureBlitter.create(); + emit glReady(); } void Window::paintGL() diff --git a/examples/wayland/minimal-cpp/window.h b/examples/wayland/minimal-cpp/window.h index 1a106da9..7711e0bd 100644 --- a/examples/wayland/minimal-cpp/window.h +++ b/examples/wayland/minimal-cpp/window.h @@ -60,10 +60,14 @@ class Compositor; class Window : public QOpenGLWindow { + Q_OBJECT public: Window(); void setCompositor(Compositor *comp); +signals: + void glReady(); + protected: void initializeGL() override; void paintGL() override; diff --git a/examples/wayland/qwindow-compositor/main.cpp b/examples/wayland/qwindow-compositor/main.cpp index f2b00e88..9d8c1f78 100644 --- a/examples/wayland/qwindow-compositor/main.cpp +++ b/examples/wayland/qwindow-compositor/main.cpp @@ -59,7 +59,6 @@ int main(int argc, char *argv[]) Window window; Compositor compositor(&window); window.setCompositor(&compositor); - compositor.create(); window.resize(800,600); window.show(); diff --git a/examples/wayland/qwindow-compositor/window.cpp b/examples/wayland/qwindow-compositor/window.cpp index b8b8e52e..9a8ffc2d 100644 --- a/examples/wayland/qwindow-compositor/window.cpp +++ b/examples/wayland/qwindow-compositor/window.cpp @@ -78,6 +78,7 @@ void Window::initializeGL() m_backgroundTexture->setMinificationFilter(QOpenGLTexture::Nearest); m_backgroundImageSize = backgroundImage.size(); m_textureBlitter.create(); + m_compositor->create(); // the compositor's hardware integration may depend on GL } void Window::drawBackground() |