Using vertex shader files

Matthew Waters ystreet00 at gmail.com
Fri Aug 21 03:36:16 PDT 2015


-bad/ext/gl/gstglfiltershader.c is the element where you can currently
only set the fragment shader

-bad/gst-libs/gst/gl/gstglshader.c is the library object that wraps
OpenGL shader functionality which exposes slightly more functionality
than the above element.

As I said earlier, I have the beginnings of some work to modernize both
objects which will be pushed after 1.6 is out to the master branch. 
This modernization will allow (for example) setting the vertex shader.

The other option is that you write your own element to do what you
want.  Up to you.

On 21/08/15 18:57, Hamdi Rakkez wrote:
> OKay but why we have this in the gstshader.c :
>
>         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";
>
>
>            switch (prop_id) {
>             case PROP_VERTEX_SRC:
>               gst_gl_shader_set_vertex_source (shader,
>         g_value_get_string (value));
>               break;
>             case PROP_FRAGMENT_SRC:
>               gst_gl_shader_set_fragment_source (shader,
>         g_value_get_string (value));
>               break;
>
>
> On Fri, Aug 21, 2015 at 5:00 AM, Matthew Waters <ystreet00 at gmail.com
> <mailto:ystreet00 at gmail.com>> wrote:
>
>     On 20/08/15 19:42, Hamdi Rakkez wrote:
>>     Hi list,
>>
>>     Is it possible to use vertex shader files with gstreamer glshader ?
>
>     No, see my previous email for some more details.
>
>>     Thnaks.
>>
>>     Best,
>>     Hamdi
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150821/e95092b5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150821/e95092b5/attachment.sig>


More information about the gstreamer-devel mailing list