mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2114>
This commit is contained in:
parent
8a55dd9233
commit
af71adf315
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue