diff options
author | Matthew Waters <matthew@centricular.com> | 2015-11-10 13:11:37 +1100 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2015-11-10 15:42:35 +1100 |
commit | 8acafe6f9f620ff97e5f9eab9fed94551493e0b1 (patch) | |
tree | d347ec6c60e75d1fbe1f85b7af8bf0b4fd0ee0d0 /gst-libs/gst/gl/gstglslstage.c | |
parent | 8ae7cc4ee6feeaa772dfd1240ff3f5c4368a280a (diff) |
glslstage: expose the default shader strings as public
Add some other simple strings for external-oes textures or transforming
the texture coordinates with a transformation matrix
Diffstat (limited to 'gst-libs/gst/gl/gstglslstage.c')
-rw-r--r-- | gst-libs/gst/gl/gstglslstage.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/gst-libs/gst/gl/gstglslstage.c b/gst-libs/gst/gl/gstglslstage.c index 062b29ae5..89f97cff4 100644 --- a/gst-libs/gst/gl/gstglslstage.c +++ b/gst-libs/gst/gl/gstglslstage.c @@ -29,29 +29,6 @@ static const gchar *es2_version_header = "#version 100\n"; -/* *INDENT-OFF* */ -static const gchar *simple_vertex_shader_str_gles2 = - "attribute vec4 a_position;\n" - "attribute vec2 a_texcoord;\n" - "varying vec2 v_texcoord;\n" - "void main()\n" - "{\n" - " gl_Position = a_position;\n" - " v_texcoord = a_texcoord;\n" - "}\n"; - -static const gchar *simple_fragment_shader_str_gles2 = - "#ifdef GL_ES\n" - "precision mediump float;\n" - "#endif\n" - "varying vec2 v_texcoord;\n" - "uniform sampler2D tex;\n" - "void main()\n" - "{\n" - " gl_FragColor = texture2D(tex, v_texcoord);\n" - "}"; -/* *INDENT-ON* */ - GST_DEBUG_CATEGORY_STATIC (gst_glsl_stage_debug); #define GST_CAT_DEFAULT gst_glsl_stage_debug @@ -279,7 +256,7 @@ gst_glsl_stage_new_default_vertex (GstGLContext * context) return gst_glsl_stage_new_with_string (context, GL_VERTEX_SHADER, GST_GLSL_VERSION_NONE, GST_GLSL_PROFILE_ES | GST_GLSL_PROFILE_COMPATIBILITY, - simple_vertex_shader_str_gles2); + gst_gl_shader_string_vertex_default); } /** @@ -294,7 +271,7 @@ gst_glsl_stage_new_default_fragment (GstGLContext * context) return gst_glsl_stage_new_with_string (context, GL_FRAGMENT_SHADER, GST_GLSL_VERSION_NONE, GST_GLSL_PROFILE_ES | GST_GLSL_PROFILE_COMPATIBILITY, - simple_fragment_shader_str_gles2); + gst_gl_shader_string_fragment_default); } /** |