From 4844c530175d823e0fc8adb802140531a5fe396b Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Thu, 24 Apr 2014 15:36:47 +0100 Subject: [PATCH] gl: call glClearColor before glClear --- ext/gl/gstglimagesink.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c index b9f21a5bb3..1bcba1b576 100644 --- a/ext/gl/gstglimagesink.c +++ b/ext/gl/gstglimagesink.c @@ -1124,6 +1124,8 @@ gst_glimage_sink_on_draw (const GstGLImageSink * gl_sink) 0.0f, 1.0f, 1.0f, 1.0f }; + + gl->ClearColor (0.0, 0.0, 0.0, 0.0); gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); gl->MatrixMode (GL_PROJECTION); @@ -1159,6 +1161,7 @@ gst_glimage_sink_on_draw (const GstGLImageSink * gl_sink) GLushort indices[] = { 0, 1, 2, 0, 2, 3 }; + gl->ClearColor (0.0, 0.0, 0.0, 0.0); gl->Clear (GL_COLOR_BUFFER_BIT); gst_gl_shader_use (gl_sink->redisplay_shader);