diff --git a/gst-libs/gst/gl/gstglframebuffer.c b/gst-libs/gst/gl/gstglframebuffer.c index 35c2211a60..4e071c4a48 100644 --- a/gst-libs/gst/gl/gstglframebuffer.c +++ b/gst-libs/gst/gl/gstglframebuffer.c @@ -300,7 +300,9 @@ gst_gl_framebuffer_use_v2 (GstGLFramebuffer * frame, gint texture_fbo_width, gl->Viewport (0, 0, texture_fbo_width, texture_fbo_height); +#if GST_GL_HAVE_OPENGL gl->DrawBuffer (GL_COLOR_ATTACHMENT0); +#endif gl->ClearColor (0.0, 0.0, 0.0, 0.0); gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -308,7 +310,9 @@ gst_gl_framebuffer_use_v2 (GstGLFramebuffer * frame, gint texture_fbo_width, /* the opengl scene */ cb (stuff); +#if GST_GL_HAVE_OPENGL gl->DrawBuffer (GL_NONE); +#endif gl->Viewport (viewport_dim[0], viewport_dim[1], viewport_dim[2], viewport_dim[3]); diff --git a/tests/check/libs/gstglcontext.c b/tests/check/libs/gstglcontext.c index 5f4ebb412b..d5c5a8ecf1 100644 --- a/tests/check/libs/gstglcontext.c +++ b/tests/check/libs/gstglcontext.c @@ -89,7 +89,7 @@ init (gpointer data) fail_if (tex == 0, "failed to create texture"); #if GST_GL_HAVE_GLES2 - shader = gst_gl_shader_new (display); + shader = gst_gl_shader_new (context); fail_if (shader == NULL, "failed to create shader object"); gst_gl_shader_set_vertex_source (shader, vertex_shader_str_gles2);