From: Matthew Waters Date: Wed, 28 Jun 2017 04:45:18 +0000 (+1000) Subject: gl: reset gl->DrawBuffer to the necessary values X-Git-Tag: accepted/tizen/unified/20220217.153506~2^2~10^2~9^2~12^2~2^2~111^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e9bcddb7c61d681ef24cc901bff25fdc2b3ac555;p=platform%2Fupstream%2Fgstreamer.git 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 --- 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],