From af71adf3153fac05495c7f758999fb78e9379937 Mon Sep 17 00:00:00 2001 From: Matthias Fuchs Date: Mon, 14 Mar 2022 17:20:38 +0100 Subject: [PATCH] qmlglsrc: Fix missing depth & stencil buffer Qt Quick primitives which have some kind of alpha blending (transparency, rounded corners) are z-sorted by Qt and rendered in the correct order. For opaque primitives Qt relies on the OpenGL depth buffer to correctly determine the visibility of stacked elements. This change enables the depth buffer to make sure that opaque primitives are correctly z-stacked. https://doc.qt.io/qt-6/qtquick-visualcanvas-scenegraph-renderer.html#opaque-primitives Part-of: --- subprojects/gst-plugins-good/ext/qt/qtwindow.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/ext/qt/qtwindow.cc b/subprojects/gst-plugins-good/ext/qt/qtwindow.cc index a2d931b290..70707d8059 100644 --- a/subprojects/gst-plugins-good/ext/qt/qtwindow.cc +++ b/subprojects/gst-plugins-good/ext/qt/qtwindow.cc @@ -148,7 +148,7 @@ QtGLWindow::beforeRendering() GST_DEBUG ("create new framebuffer object %dX%d", width, height); fbo.reset(new QOpenGLFramebufferObject (width, height, - QOpenGLFramebufferObject::NoAttachment, GL_TEXTURE_2D, GL_RGBA)); + QOpenGLFramebufferObject::CombinedDepthStencil, GL_TEXTURE_2D, GL_RGBA)); source->setRenderTarget(fbo.data()); } else if (this->priv->useDefaultFbo) {