diff options
Diffstat (limited to 'src/platformsupport/eglconvenience/qeglcompositor.cpp')
-rw-r--r-- | src/platformsupport/eglconvenience/qeglcompositor.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/platformsupport/eglconvenience/qeglcompositor.cpp b/src/platformsupport/eglconvenience/qeglcompositor.cpp index 028f92f3cf..0deb8d3c39 100644 --- a/src/platformsupport/eglconvenience/qeglcompositor.cpp +++ b/src/platformsupport/eglconvenience/qeglcompositor.cpp @@ -142,7 +142,6 @@ void QEGLCompositor::render(QEGLPlatformWindow *window) for (int i = 0; i < textures->count(); ++i) { uint textureId = textures->textureId(i); - glBindTexture(GL_TEXTURE_2D, textureId); QMatrix4x4 target = QOpenGLTextureBlitter::targetTransform(textures->geometry(i), targetWindowRect); const float opacity = window->window()->opacity(); @@ -160,13 +159,21 @@ void QEGLCompositor::render(QEGLPlatformWindow *window) const bool translucent = window->window()->requestedFormat().alphaBufferSize() > 0; blend.set(translucent); m_blitter->blit(textureId, target, QOpenGLTextureBlitter::OriginTopLeft); - } else { + } else if (!textures->stacksOnTop(i)) { // Texture from an FBO belonging to a QOpenGLWidget blend.set(false); m_blitter->blit(textureId, target, QOpenGLTextureBlitter::OriginBottomLeft); } } + for (int i = 0; i < textures->count(); ++i) { + if (textures->stacksOnTop(i)) { + QMatrix4x4 target = QOpenGLTextureBlitter::targetTransform(textures->geometry(i), targetWindowRect); + blend.set(true); + m_blitter->blit(textures->textureId(i), target, QOpenGLTextureBlitter::OriginBottomLeft); + } + } + m_blitter->setOpacity(1.0f); } |