Update GLSL uniforms (glshader element)
Yu You
youyu.youyu at gmail.com
Thu May 6 11:40:57 UTC 2021
Hi,
There's a way to modify uniform variables for the glshader element.
The following is an example of changing simple value types like float.
uniforms = Gst.Structure.new_empty("uniforms")
u1 = GObject.Value(GObject.TYPE_FLOAT)
u1.set_float(hdegree)
uniforms.set_value("u1", u1)
shader.set_property("uniforms", uniforms)
uniforms.free()
But it is common in GLSL shader we use data types like Vec2/Vec3.
The following code did not work.
v1 = Graphene.Vec2()
v1.init(0.5,0.5)
uniforms.set_value("v1", v1)
Should I create GObject.Value() with GObject.TYPE_?? for Graphene.Vec2?
How to set the Graphene.Vec2 object to the GObject.Value?
Thanks.
Regards,
Yu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210506/9df75545/attachment-0001.htm>
More information about the gstreamer-devel
mailing list