Gnome::Gsk4::N-ShaderArgsBuilder

#------------------------------------------------------------------------------- #--[Class Description]---------------------------------------------------------- #-------------------------------------------------------------------------------

Description

An object to build the uniforms data for a Gnome::Gsk4::GLShader.

#------------------------------------------------------------------------------- #--[Class Initialization]------------------------------------------------------- #-------------------------------------------------------------------------------

Class initialization

new

:native-object

Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object() :$native-object! )

#-------------------------------------------------------------------------------

new-shaderargsbuilder

Allocates a builder that can be used to construct a new uniform data chunk.

method new-shaderargsbuilder ( N-Object() $shader, N-Object $initial-values --> Gnome::Gsk4::ShaderArgsBuilder \)
  • $shader; a Gnome::Gsk4::GLShader.

  • $initial-values; optional Gnome::Glib::N-Bytes with initial values

#------------------------------------------------------------------------------- #--[Methods]-------------------------------------------------------------------- #-------------------------------------------------------------------------------

Methods

#-------------------------------------------------------------------------------

free-to-args

Creates a new Gnome::Glib::N-Bytes args from the current state of the given $builder, and frees the $builder instance.

Any uniforms of the shader that have not been explicitly set on the $builder are zero-initialized.

method free-to-args (--> N-Object )

Return value; the newly allocated buffer with all the args added to $builder.

#-------------------------------------------------------------------------------

ref

Increases the reference count of a Gnome::Gsk4::N-ShaderArgsBuilder by one.

method ref (--> N-Object )

Return value; the passed in Gnome::Gsk4::N-ShaderArgsBuilder.

#-------------------------------------------------------------------------------

set-bool

Sets the value of the uniform $idx.

The uniform must be of bool type.

method set-bool ( Int() $idx, Bool() $value )
  • $idx; index of the uniform.

  • $value; value to set the uniform to.

#-------------------------------------------------------------------------------

set-float

Sets the value of the uniform $idx.

The uniform must be of float type.

method set-float ( Int() $idx, Num() $value )
  • $idx; index of the uniform.

  • $value; value to set the uniform to.

#-------------------------------------------------------------------------------

set-int

Sets the value of the uniform $idx.

The uniform must be of int type.

method set-int ( Int() $idx, Int() $value )
  • $idx; index of the uniform.

  • $value; value to set the uniform to.

#-------------------------------------------------------------------------------

set-uint

Sets the value of the uniform $idx.

The uniform must be of uint type.

method set-uint ( Int() $idx, UInt() $value )
  • $idx; index of the uniform.

  • $value; value to set the uniform to.

#-------------------------------------------------------------------------------

set-vec2

Sets the value of the uniform $idx.

The uniform must be of vec2 type.

method set-vec2 ( Int() $idx, N-Object $value )
  • $idx; index of the uniform.

  • $value; value to set the uniform too

#-------------------------------------------------------------------------------

set-vec3

Sets the value of the uniform $idx.

The uniform must be of vec3 type.

method set-vec3 ( Int() $idx, N-Object $value )
  • $idx; index of the uniform.

  • $value; value to set the uniform too

#-------------------------------------------------------------------------------

set-vec4

Sets the value of the uniform $idx.

The uniform must be of vec4 type.

method set-vec4 ( Int() $idx, N-Object $value )
  • $idx; index of the uniform.

  • $value; value to set the uniform too

#-------------------------------------------------------------------------------

to-args

Creates a new Gnome::Glib::N-Bytes args from the current state of the given $builder.

Any uniforms of the shader that have not been explicitly set on the $builder are zero-initialized.

The given Gnome::Gsk4::N-ShaderArgsBuilder is reset once this function returns; you cannot call this function multiple times on the same $builder instance.

This function is intended primarily for bindings. C code should use .free-to-args().

method to-args (--> N-Object )

Return value; the newly allocated buffer with all the args added to $builder.

#-------------------------------------------------------------------------------

unref

Decreases the reference count of a GskShaderArgBuilder by one.

If the resulting reference count is zero, frees the builder.

method unref ( )

Gnome::Gsk4 v0.2.0

GSK is the rendering and scene graph API

Authors

  • Marcel Timmerman

License

Artistic-2.0

Dependencies

Gnome::Gdk4:api<2>Gnome::Graphene:api<2>Gnome::GObject:api<2>Gnome::Glib:api<2>Gnome::N:api<2>

Test Dependencies

Provides

  • Gnome::Gsk4::BlendNode
  • Gnome::Gsk4::BlurNode
  • Gnome::Gsk4::BorderNode
  • Gnome::Gsk4::CairoNode
  • Gnome::Gsk4::CairoRenderer
  • Gnome::Gsk4::ClipNode
  • Gnome::Gsk4::ColorMatrixNode
  • Gnome::Gsk4::ColorNode
  • Gnome::Gsk4::ConicGradientNode
  • Gnome::Gsk4::ContainerNode
  • Gnome::Gsk4::CrossFadeNode
  • Gnome::Gsk4::DebugNode
  • Gnome::Gsk4::GLRenderer
  • Gnome::Gsk4::GLShader
  • Gnome::Gsk4::GLShaderNode
  • Gnome::Gsk4::InsetShadowNode
  • Gnome::Gsk4::LinearGradientNode
  • Gnome::Gsk4::MaskNode
  • Gnome::Gsk4::N-RoundedRect
  • Gnome::Gsk4::N-ShaderArgsBuilder
  • Gnome::Gsk4::N-Transform
  • Gnome::Gsk4::OpacityNode
  • Gnome::Gsk4::OutsetShadowNode
  • Gnome::Gsk4::RadialGradientNode
  • Gnome::Gsk4::RenderNode
  • Gnome::Gsk4::Renderer
  • Gnome::Gsk4::RepeatNode
  • Gnome::Gsk4::RepeatingLinearGradientNode
  • Gnome::Gsk4::RepeatingRadialGradientNode
  • Gnome::Gsk4::RoundedClipNode
  • Gnome::Gsk4::ShadowNode
  • Gnome::Gsk4::T-enums
  • Gnome::Gsk4::T-glshader
  • Gnome::Gsk4::T-path
  • Gnome::Gsk4::T-rendernode
  • Gnome::Gsk4::T-roundedrect
  • Gnome::Gsk4::T-stroke
  • Gnome::Gsk4::T-transform
  • Gnome::Gsk4::T-types
  • Gnome::Gsk4::TextNode
  • Gnome::Gsk4::TextureNode
  • Gnome::Gsk4::TextureScaleNode
  • Gnome::Gsk4::TransformNode

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.