diff options
author | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2016-05-27 21:43:56 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-05-27 21:43:56 +0000 |
commit | c08f1dc4c88a380270dd040c70158fb21a6f5e41 (patch) | |
tree | edce729fc5d56e82d5812f32f6aa84252b79eb8f /examples | |
parent | 9979e7e55dcd6c89b8b721c2af83998e9cc9d731 (diff) | |
parent | e56322f10613e0838ecec7fa74e676f625dbf884 (diff) |
Merge "Merge remote-tracking branch 'qt/5.7.0' into 5.7" into refs/staging/5.7
Diffstat (limited to 'examples')
-rw-r--r-- | examples/wayland/custom-extension/client/client.pro | 8 | ||||
-rw-r--r-- | examples/wayland/qwindow-compositor/windowcompositor.cpp | 9 |
2 files changed, 12 insertions, 5 deletions
diff --git a/examples/wayland/custom-extension/client/client.pro b/examples/wayland/custom-extension/client/client.pro index c2e9a77d7..9ba72bc9c 100644 --- a/examples/wayland/custom-extension/client/client.pro +++ b/examples/wayland/custom-extension/client/client.pro @@ -1,6 +1,3 @@ -PLUGIN_TYPE = platforms -load(qt_plugin) - CONFIG += wayland-scanner CONFIG += link_pkgconfig @@ -22,3 +19,8 @@ SOURCES += main.cpp \ HEADERS += customextension.h +PLUGIN_TYPE = platforms +load(qt_plugin) + +# Installation into a "proper" Qt location is most unexpected for from an example. +CONFIG += install_ok diff --git a/examples/wayland/qwindow-compositor/windowcompositor.cpp b/examples/wayland/qwindow-compositor/windowcompositor.cpp index ecbbc5041..d3e3e1cf0 100644 --- a/examples/wayland/qwindow-compositor/windowcompositor.cpp +++ b/examples/wayland/qwindow-compositor/windowcompositor.cpp @@ -68,16 +68,21 @@ WindowCompositorView::WindowCompositorView() GLuint WindowCompositorView::getTexture(GLenum *target) { QWaylandBufferRef buf = currentBuffer(); - m_texture = buf.textureForPlane(0); + GLuint streamingTexture = buf.textureForPlane(0); + if (streamingTexture) + m_texture = streamingTexture; - if (buf.bufferFormatEgl() == QWaylandBufferRef::BufferFormatEgl_EXTERNAL_OES) + if (!buf.isShm() && buf.bufferFormatEgl() == QWaylandBufferRef::BufferFormatEgl_EXTERNAL_OES) m_textureTarget = GL_TEXTURE_EXTERNAL_OES; if (advance()) { + buf = currentBuffer(); if (!m_texture) glGenTextures(1, &m_texture); glBindTexture(m_textureTarget, m_texture); + if (buf.isShm()) + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); buf.bindToTexture(); } |