gl: reset gl->DrawBuffer to the necessary values
authorMatthew Waters <matthew@centricular.com>
Wed, 28 Jun 2017 04:45:18 +0000 (14:45 +1000)
committerMatthew Waters <matthew@centricular.com>
Thu, 29 Jun 2017 09:33:36 +0000 (19:33 +1000)
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
gst-libs/gst/gl/gstglframebuffer.c
gst-libs/gst/gl/gstglviewconvert.c

index 89edb164c60b0c9c8be8b3560cc560f2a3989602..5947c6af62f557d1e07b20e011548dfb369ac5e3 100644 (file)
@@ -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);
index f6289970f87f9ff1c932fcd1f281fb9bc88ef178..5720cc00dad93627858d91c15620c6a8f804bf56 100644 (file)
@@ -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);
index acb9c850480b4c2bc50ec3823bce4a0eec4d178e..7f08d190d84991aa68ca90faf08caa55fea81fdb 100644 (file)
@@ -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],