summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-08-19 13:52:21 +0300
committerSebastian Dröge <sebastian@centricular.com>2015-08-19 13:55:00 +0300
commitea27fe3032639502e8467e2a7b9740695706cdee (patch)
treeafdab89ac908e7980c031744ab966388690a3962 /ext
parent8184b7e5289bc50b37196fd9c9c8a379c865b6b6 (diff)
downloadgstreamer-plugins-bad-ea27fe3032639502e8467e2a7b9740695706cdee.tar.gz
gtk/gl: Use our GL function table instead of directly calling GL functions
Otherwise we would have to link the plugin to the GL libraries directly.
Diffstat (limited to 'ext')
-rw-r--r--ext/gtk/gtkgstglwidget.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/gtk/gtkgstglwidget.c b/ext/gtk/gtkgstglwidget.c
index cdce3aa54..1b2cadb01 100644
--- a/ext/gtk/gtkgstglwidget.c
+++ b/ext/gtk/gtkgstglwidget.c
@@ -202,10 +202,12 @@ _redraw_texture (GtkGstGLWidget * gst_widget, guint tex)
}
static inline void
-_draw_black (void)
+_draw_black (GstGLContext * context)
{
- glClearColor (0.0, 0.0, 0.0, 0.0);
- glClear (GL_COLOR_BUFFER_BIT);
+ const GstGLFuncs *gl = context->gl_vtable;
+
+ gl->ClearColor (0.0, 0.0, 0.0, 0.0);
+ gl->Clear (GL_COLOR_BUFFER_BIT);
}
static gboolean
@@ -225,7 +227,7 @@ gtk_gst_gl_widget_render (GtkGLArea * widget, GdkGLContext * context)
gtk_gst_gl_widget_init_redisplay (GTK_GST_GL_WIDGET (widget));
if (!priv->initted || !base_widget->negotiated) {
- _draw_black ();
+ _draw_black (priv->other_context);
goto done;
}
@@ -237,7 +239,7 @@ gtk_gst_gl_widget_render (GtkGLArea * widget, GdkGLContext * context)
if (!gst_video_frame_map (&gl_frame, &base_widget->v_info, buffer,
GST_MAP_READ | GST_MAP_GL)) {
- _draw_black ();
+ _draw_black (priv->other_context);
goto done;
}