mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
qt/gloverlay: reset OpenGL state after Qt drawing
Reset to the original OpenGL state as required by the GStreamer OpenGL API contract. Fixes output with a glimagesink element downstream. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/623>
This commit is contained in:
parent
ffe4d09efc
commit
6fba2e3dd3
1 changed files with 7 additions and 0 deletions
|
@ -555,6 +555,8 @@ void GstQuickRenderer::ensureFbo()
|
|||
void
|
||||
GstQuickRenderer::renderGstGL ()
|
||||
{
|
||||
const GstGLFuncs *gl = gl_context->gl_vtable;
|
||||
|
||||
GST_TRACE ("%p current QOpenGLContext %p", this,
|
||||
QOpenGLContext::currentContext());
|
||||
m_quickWindow->resetOpenGLState();
|
||||
|
@ -585,6 +587,11 @@ GstQuickRenderer::renderGstGL ()
|
|||
gl_mem = (GstGLMemory *) gst_gl_base_memory_alloc (gl_allocator, gl_params);
|
||||
|
||||
m_fbo = nullptr;
|
||||
|
||||
m_quickWindow->resetOpenGLState ();
|
||||
/* Qt doesn't seem to reset this, breaking glimagesink */
|
||||
if (gl->DrawBuffer)
|
||||
gl->DrawBuffer (GL_BACK);
|
||||
}
|
||||
|
||||
GstGLMemory *GstQuickRenderer::generateOutput(GstClockTime input_ns)
|
||||
|
|
Loading…
Reference in a new issue