package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Shader_args_builder

type t = [ `shader_args_builder ] Gobject.obj

An object to build the uniforms data for a `GskGLShader`.

val new_ : [ `gl_shader | `object_ ] Gobject.obj -> Glib_bytes.t option -> t

Create a new ShaderArgsBuilder

val to_args : t -> Glib_bytes.t

Creates a new `GBytes` 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 `GskShaderArgsBuilder` 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 method@Gsk.ShaderArgsBuilder.free_to_args.

val set_vec4 : t -> int -> Ocgtk_graphene.Graphene.Wrappers.Vec4.t -> unit

Sets the value of the uniform @idx.

The uniform must be of vec4 type.

val set_vec3 : t -> int -> Ocgtk_graphene.Graphene.Wrappers.Vec3.t -> unit

Sets the value of the uniform @idx.

The uniform must be of vec3 type.

val set_vec2 : t -> int -> Ocgtk_graphene.Graphene.Wrappers.Vec2.t -> unit

Sets the value of the uniform @idx.

The uniform must be of vec2 type.

val set_uint : t -> int -> UInt32.t -> unit

Sets the value of the uniform @idx.

The uniform must be of uint type.

val set_int : t -> int -> Int32.t -> unit

Sets the value of the uniform @idx.

The uniform must be of int type.

val set_float : t -> int -> float -> unit

Sets the value of the uniform @idx.

The uniform must be of float type.

val set_bool : t -> int -> bool -> unit

Sets the value of the uniform @idx.

The uniform must be of bool type.

val ref : t -> t

Increases the reference count of a `GskShaderArgsBuilder` by one.

val get_type : unit -> Gobject.Type.t