mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-01 13:49:58 +00:00
qmlglsrc: read from the back buffer when use-default-fbo = TRUE
glReadBuffer(GL_COLOR_ATTACHMENT0) on the default framebuffer (0) is invalid GL API usage and would result in a GL error being thrown.
This commit is contained in:
parent
7f1e1d0d9d
commit
ae80fa4731
1 changed files with 5 additions and 2 deletions
|
@ -242,14 +242,17 @@ QtGLWindow::afterRendering()
|
|||
GST_ERROR ("FBO errors");
|
||||
goto errors;
|
||||
}
|
||||
gl->ReadBuffer (GL_COLOR_ATTACHMENT0);
|
||||
if (this->priv->useDefaultFbo)
|
||||
gl->ReadBuffer (GL_BACK);
|
||||
else
|
||||
gl->ReadBuffer (GL_COLOR_ATTACHMENT0);
|
||||
gl->BlitFramebuffer (0, 0, width, height,
|
||||
0, 0, width, height,
|
||||
GL_COLOR_BUFFER_BIT, GL_LINEAR);
|
||||
} else {
|
||||
gl->CopyTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, width, height, 0);
|
||||
}
|
||||
|
||||
|
||||
GST_DEBUG ("rendering finished");
|
||||
|
||||
errors:
|
||||
|
|
Loading…
Reference in a new issue