summaryrefslogtreecommitdiff
path: root/gst/gl/gstglcolorscale.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/gl/gstglcolorscale.c')
-rw-r--r--gst/gl/gstglcolorscale.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gst/gl/gstglcolorscale.c b/gst/gl/gstglcolorscale.c
index ffea2d5..10ea7fc 100644
--- a/gst/gl/gstglcolorscale.c
+++ b/gst/gl/gstglcolorscale.c
@@ -143,8 +143,14 @@ gst_gl_colorscale_callback (gint width, gint height, guint texture,
{
GstGLFilter *filter = GST_GL_FILTER (stuff);
- glMatrixMode (GL_PROJECTION);
- glLoadIdentity ();
+#if GST_GL_HAVE_OPENGL
+ if (gst_gl_context_get_gl_api (filter->context) & GST_GL_API_OPENGL) {
+ const GstGLFuncs *gl = filter->context->gl_vtable;
+
+ gl->MatrixMode (GL_PROJECTION);
+ gl->LoadIdentity ();
+ }
+#endif
gst_gl_filter_draw_texture (filter, texture, width, height);
}