The snapshotter takes ownership of take_args, so the caller should
not free it after this.
If the renderer doesn't support GL shaders, or if there is any
problem when compiling the shader, then the node will draw pink.
You should use gsk.glshader.GLShader.compile to ensure the shader
will work for the renderer before using it.
If you want to use pre-existing textures as input to the shader rather
than rendering new ones, use gtk.snapshot.Snapshot.appendTexture to
push a texture node. These will be used directly rather than being
re-rendered.
Push a gsk.glshader_node.GLShaderNode.
The node uses the given gsk.glshader.GLShader and uniform values Additionally this takes a list of n_children other nodes which will be passed to the gsk.glshader_node.GLShaderNode.
The take_args argument is a block of data to use for uniform arguments, as per types and offsets defined by the shader. Normally this is generated by gsk.glshader.GLShader.formatArgs or gsk.shader_args_builder.ShaderArgsBuilder.
The snapshotter takes ownership of take_args, so the caller should not free it after this.
If the renderer doesn't support GL shaders, or if there is any problem when compiling the shader, then the node will draw pink. You should use gsk.glshader.GLShader.compile to ensure the shader will work for the renderer before using it.
If the shader requires textures (see gsk.glshader.GLShader.getNTextures), then it is expected that you call gtk.snapshot.Snapshot.glShaderPopTexture the number of times that are required. Each of these calls will generate a node that is added as a child to the gsk.glshader_node.GLShaderNode, which in turn will render these offscreen and pass as a texture to the shader.
Once all textures (if any) are pop:ed, you must call the regular gtk.snapshot.Snapshot.pop.
If you want to use pre-existing textures as input to the shader rather than rendering new ones, use gtk.snapshot.Snapshot.appendTexture to push a texture node. These will be used directly rather than being re-rendered.
For details on how to write shaders, see gsk.glshader.GLShader.