mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
gstglutils: fix shader compilation on Mountain Lion
Make gst_gl_context_gen_shader/_compile_shader assume GST_GLSL_PROFILE_ES | GST_GLSL_PROFILE_COMPATIBILITY as the profile. Without this, the shader compiler doesn't inject the #version tag resulting in a compilation error on Mountain Lion. This is a workaround for old code using gst_gl_context_gen_shader. New code should use the gst_glsl_stage_* API directly which allows the caller to explicitly specify version/profile.
This commit is contained in:
parent
c4657f4276
commit
614ea95690
1 changed files with 5 additions and 2 deletions
|
@ -393,7 +393,8 @@ _compile_shader (GstGLContext * context, struct _compile_shader *data)
|
|||
|
||||
if (data->vertex_src) {
|
||||
vert = gst_glsl_stage_new_with_string (context, GL_VERTEX_SHADER,
|
||||
GST_GLSL_VERSION_NONE, GST_GLSL_PROFILE_NONE, data->vertex_src);
|
||||
GST_GLSL_VERSION_NONE,
|
||||
GST_GLSL_PROFILE_ES | GST_GLSL_PROFILE_COMPATIBILITY, data->vertex_src);
|
||||
if (!gst_glsl_stage_compile (vert, &error)) {
|
||||
GST_ERROR_OBJECT (vert, "%s", error->message);
|
||||
gst_object_unref (shader);
|
||||
|
@ -407,7 +408,9 @@ _compile_shader (GstGLContext * context, struct _compile_shader *data)
|
|||
|
||||
if (data->fragment_src) {
|
||||
frag = gst_glsl_stage_new_with_string (context, GL_FRAGMENT_SHADER,
|
||||
GST_GLSL_VERSION_NONE, GST_GLSL_PROFILE_NONE, data->fragment_src);
|
||||
GST_GLSL_VERSION_NONE,
|
||||
GST_GLSL_PROFILE_ES | GST_GLSL_PROFILE_COMPATIBILITY,
|
||||
data->fragment_src);
|
||||
if (!gst_glsl_stage_compile (frag, &error)) {
|
||||
GST_ERROR_OBJECT (frag, "%s", error->message);
|
||||
gst_object_unref (shader);
|
||||
|
|
Loading…
Reference in a new issue