A render node using a GL shader when drawing its children nodes.
function Create
(Object : not null access System.Address)
return Gsk_Glshader_Node_Record
function Get_Shader
(Self : Gsk_Glshader_Node) return Gsk.Glshader.Gsk_Glshader
Gets shader code for the node.
the GskGLShader shader. Has transfer-ownership='none'.
function Get_Type return Glib.GType
type Gsk_Glshader_Node is access all Gsk_Glshader_Node_Record'Class;
function Gsk_Glshader_Node_New
(Shader : not null access Gsk.Glshader.Gsk_Glshader_Record'Class;
Bounds : not null access Graphene.Rect.Graphene_Rect_T;
Args : Glib.Bytes.Gbytes;
Children : Gsk.Render_Node.Gsk_Render_Node_Array)
return Gsk_Glshader_Node
Creates a GskRenderNode that will render the given Shader into the area given by Bounds. The Args is a block of data to use for uniform input, as per types and offsets defined by the Shader. Normally this is generated by [methodGsk.GLShader.format_args] or [structGsk.ShaderArgsBuilder]. See [classGsk.GLShader] for details about how the shader should be written. All the children will be rendered into textures (if they aren't already GskTextureNodes, which will be used directly). These textures will be sent as input to the shader. 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 [methodGsk.GLShader.compile] to ensure the Shader will work for the renderer before using it.
the GskGLShader
the rectangle to render the shader into
Arguments for the uniforms
array of child nodes, these will be rendered to textures and used as input. Currently the GL backend supports up to 4 children
type Gsk_Glshader_Node_Record is new Gsk_Render_Node_Record with null record;
procedure Gtk_New
(Self : out Gsk_Glshader_Node;
Shader : not null access Gsk.Glshader.Gsk_Glshader_Record'Class;
Bounds : not null access Graphene.Rect.Graphene_Rect_T;
Args : Glib.Bytes.Gbytes;
Children : Gsk.Render_Node.Gsk_Render_Node_Array)
Creates a GskRenderNode that will render the given Shader into the area given by Bounds. The Args is a block of data to use for uniform input, as per types and offsets defined by the Shader. Normally this is generated by [methodGsk.GLShader.format_args] or [structGsk.ShaderArgsBuilder]. See [classGsk.GLShader] for details about how the shader should be written. All the children will be rendered into textures (if they aren't already GskTextureNodes, which will be used directly). These textures will be sent as input to the shader. 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 [methodGsk.GLShader.compile] to ensure the Shader will work for the renderer before using it. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
the GskGLShader
the rectangle to render the shader into
Arguments for the uniforms
array of child nodes, these will be rendered to textures and used as input. Currently the GL backend supports up to 4 children
procedure Initialize
(Self : not null access Gsk_Glshader_Node_Record'Class;
Shader : not null access Gsk.Glshader.Gsk_Glshader_Record'Class;
Bounds : not null access Graphene.Rect.Graphene_Rect_T;
Args : Glib.Bytes.Gbytes;
Children : Gsk.Render_Node.Gsk_Render_Node_Array)
Creates a GskRenderNode that will render the given Shader into the area given by Bounds. The Args is a block of data to use for uniform input, as per types and offsets defined by the Shader. Normally this is generated by [methodGsk.GLShader.format_args] or [structGsk.ShaderArgsBuilder]. See [classGsk.GLShader] for details about how the shader should be written. All the children will be rendered into textures (if they aren't already GskTextureNodes, which will be used directly). These textures will be sent as input to the shader. 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 [methodGsk.GLShader.compile] to ensure the Shader will work for the renderer before using it. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
the GskGLShader
the rectangle to render the shader into
Arguments for the uniforms
array of child nodes, these will be rendered to textures and used as input. Currently the GL backend supports up to 4 children