summaryrefslogtreecommitdiff
path: root/ext/gl
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2015-05-14 14:56:30 +1000
committerMatthew Waters <matthew@centricular.com>2015-05-14 14:58:07 +1000
commita8521466243777e887bb23c835e5a5119f90c745 (patch)
treecd91fab1547bd624a4f58bf4c2aed6becf705b4b /ext/gl
parente1b077d6aff3e431cc94bae22629070aa7047fdb (diff)
downloadgstreamer-plugins-bad-a8521466243777e887bb23c835e5a5119f90c745.tar.gz
gleffects: only try the GL2 shader init path if we have a GL2 context
Diffstat (limited to 'ext/gl')
-rw-r--r--ext/gl/gstgleffects.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/ext/gl/gstgleffects.c b/ext/gl/gstgleffects.c
index 02878d229..485456f62 100644
--- a/ext/gl/gstgleffects.c
+++ b/ext/gl/gstgleffects.c
@@ -556,13 +556,15 @@ gst_gl_effects_get_fragment_shader (GstGLEffects * effects,
}
}
#if GST_GL_HAVE_OPENGL
- if (!gst_gl_shader_compile_and_check (shader,
- shader_source_opengl, GST_GL_SHADER_FRAGMENT_SOURCE)) {
- gst_gl_context_set_error (context, "Failed to initialize %s shader",
- shader_name);
- GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND, ("%s",
- gst_gl_context_get_error ()), (NULL));
- return NULL;
+ if (USING_OPENGL (context)) {
+ if (!gst_gl_shader_compile_and_check (shader,
+ shader_source_opengl, GST_GL_SHADER_FRAGMENT_SOURCE)) {
+ gst_gl_context_set_error (context, "Failed to initialize %s shader",
+ shader_name);
+ GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND, ("%s",
+ gst_gl_context_get_error ()), (NULL));
+ return NULL;
+ }
}
#endif
}