Dynamic change of glshader element

Holger weber at telerob.de
Fri Sep 2 13:33:37 UTC 2016


My knowledge of opengl is very low - but I now know what you mean.
I added a callback for the create-shader signal in python. But I found no
access over the passed element to  the running shader.
But there is another property which is working fine "uniforms". I didn't
recognize it before...

It still was a horror to find the right python functions but now it's
working for a dictionary with the uniforms as string and the value as float.

def update_uniforms(self, dictUniforms):
        stcUni = Gst.Structure.new_empty("uniforms")
        for k, v in dictUniforms.items():
            tmp = GObject.Value(GObject.TYPE_FLOAT)
            tmp.set_float(v)
            stcUni.set_value(k, tmp)

        self.elGlshader.set_property("uniforms", stcUni)

Maybe this might help someone else...



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Dynamic-change-of-glshader-element-tp4669514p4679378.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list