diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c
index bec8cbc..27c1184 100644
--- a/gst-libs/gst/gl/gstglfilter.c
+++ b/gst-libs/gst/gl/gstglfilter.c
@@ -458,6 +458,7 @@ gst_gl_filter_render_to_target (GstGLFilter * filter,
 static void
 _draw_with_shader_cb (gint width, gint height, guint texture, gpointer stuff)
 {
+#ifndef OPENGL_ES2
   GstGLFilter *filter = GST_GL_FILTER (stuff);
 
   glMatrixMode (GL_PROJECTION);
@@ -473,6 +474,7 @@ _draw_with_shader_cb (gint width, gint height, guint texture, gpointer stuff)
   gst_gl_shader_set_uniform_1i (filter->default_shader, "tex", 1);
 
   gst_gl_filter_draw_texture (filter, texture);
+#endif
 }
 
 /* attach target to a FBO, use shader, pass input as "tex" uniform to
@@ -489,6 +491,7 @@ gst_gl_filter_render_to_target_with_shader (GstGLFilter * filter,
 void
 gst_gl_filter_draw_texture (GstGLFilter * filter, GLuint texture)
 {
+#ifndef OPENGL_ES2
   glActiveTexture (GL_TEXTURE0);
   glEnable (GL_TEXTURE_RECTANGLE_ARB);
   glBindTexture (GL_TEXTURE_RECTANGLE_ARB, texture);
@@ -505,4 +508,5 @@ gst_gl_filter_draw_texture (GstGLFilter * filter, GLuint texture)
   glVertex2f (-1.0, 1.0);
 
   glEnd ();
+#endif
 }
