From e9bcddb7c61d681ef24cc901bff25fdc2b3ac555 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 28 Jun 2017 14:45:18 +1000 Subject: [PATCH] gl: reset gl->DrawBuffer to the necessary values GL_COLOR_ATTACHMENT0 when a framebuffer is bound GL_BACK if no framebuffer is bound https://bugzilla.gnome.org/show_bug.cgi?id=784210 --- gst-libs/gst/gl/gstglcolorconvert.c | 2 +- gst-libs/gst/gl/gstglframebuffer.c | 2 +- gst-libs/gst/gl/gstglviewconvert.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c index 89edb16..5947c6a 100644 --- a/gst-libs/gst/gl/gstglcolorconvert.c +++ b/gst-libs/gst/gl/gstglcolorconvert.c @@ -2504,7 +2504,7 @@ _do_convert_draw (GstGLContext * context, GstGLColorConvert * convert) _unbind_buffer (convert); if (gl->DrawBuffer) - gl->DrawBuffer (GL_NONE); + gl->DrawBuffer (GL_COLOR_ATTACHMENT0); /* we are done with the shader */ gst_gl_context_clear_shader (context); diff --git a/gst-libs/gst/gl/gstglframebuffer.c b/gst-libs/gst/gl/gstglframebuffer.c index f628997..5720cc0 100644 --- a/gst-libs/gst/gl/gstglframebuffer.c +++ b/gst-libs/gst/gl/gstglframebuffer.c @@ -288,7 +288,7 @@ gst_gl_framebuffer_draw_to_texture (GstGLFramebuffer * fb, GstGLMemory * mem, if (gst_gl_context_get_gl_api (fb->context) & (GST_GL_API_OPENGL | GST_GL_API_OPENGL3)) - gl->DrawBuffer (GL_NONE); + gl->DrawBuffer (GL_COLOR_ATTACHMENT0); gl->Viewport (viewport_dim[0], viewport_dim[1], viewport_dim[2], viewport_dim[3]); gst_gl_context_clear_framebuffer (fb->context); diff --git a/gst-libs/gst/gl/gstglviewconvert.c b/gst-libs/gst/gl/gstglviewconvert.c index acb9c85..7f08d19 100644 --- a/gst-libs/gst/gl/gstglviewconvert.c +++ b/gst-libs/gst/gl/gstglviewconvert.c @@ -1946,7 +1946,7 @@ _do_view_convert_draw (GstGLContext * context, GstGLViewConvert * viewconvert) gl->BindVertexArray (0); _unbind_buffer (viewconvert); if (gl->DrawBuffer) - gl->DrawBuffer (GL_NONE); + gl->DrawBuffer (GL_COLOR_ATTACHMENT0); /* we are done with the shader */ gst_gl_context_clear_shader (context); gl->Viewport (viewport_dim[0], viewport_dim[1], viewport_dim[2], -- 2.7.4