:right-sidebar: True ShaderArgsBuilder =================================================================== .. currentmodule:: gi.repository.Gsk .. class:: ShaderArgsBuilder(**kwargs) :no-contents-entry: An object to build the uniforms data for a ``GskGLShader``\. Constructors ------------ .. rst-class:: interim-class .. class:: ShaderArgsBuilder :no-index: .. classmethod:: new(shader: ~gi.repository.Gsk.GLShader, initial_values: ~gi.repository.GLib.Bytes | None = None) -> ~gi.repository.Gsk.ShaderArgsBuilder Allocates a builder that can be used to construct a new uniform data chunk. .. deprecated:: 4.16 GTK's new Vulkan-focused rendering does not support this feature. Use `GtkGLArea <../gtk4/class.GLArea.html>`__ for OpenGL rendering. :param shader: a ``GskGLShader`` :param initial_values: optional ``GBytes`` with initial values Methods ------- .. rst-class:: interim-class .. class:: ShaderArgsBuilder :no-index: .. method:: set_bool(idx: int, value: bool) -> None Sets the value of the uniform ``idx``\. The uniform must be of bool type. .. deprecated:: 4.16 GTK's new Vulkan-focused rendering does not support this feature. Use `GtkGLArea <../gtk4/class.GLArea.html>`__ for OpenGL rendering. :param idx: index of the uniform :param value: value to set the uniform to .. method:: set_float(idx: int, value: float) -> None Sets the value of the uniform ``idx``\. The uniform must be of float type. :param idx: index of the uniform :param value: value to set the uniform to .. method:: set_int(idx: int, value: int) -> None Sets the value of the uniform ``idx``\. The uniform must be of int type. .. deprecated:: 4.16 GTK's new Vulkan-focused rendering does not support this feature. Use `GtkGLArea <../gtk4/class.GLArea.html>`__ for OpenGL rendering. :param idx: index of the uniform :param value: value to set the uniform to .. method:: set_uint(idx: int, value: int) -> None Sets the value of the uniform ``idx``\. The uniform must be of uint type. .. deprecated:: 4.16 GTK's new Vulkan-focused rendering does not support this feature. Use `GtkGLArea <../gtk4/class.GLArea.html>`__ for OpenGL rendering. :param idx: index of the uniform :param value: value to set the uniform to .. method:: set_vec2(idx: int, value: ~gi.repository.Graphene.Vec2) -> None Sets the value of the uniform ``idx``\. The uniform must be of vec2 type. .. deprecated:: 4.16 GTK's new Vulkan-focused rendering does not support this feature. Use `GtkGLArea <../gtk4/class.GLArea.html>`__ for OpenGL rendering. :param idx: index of the uniform :param value: value to set the uniform too .. method:: set_vec3(idx: int, value: ~gi.repository.Graphene.Vec3) -> None Sets the value of the uniform ``idx``\. The uniform must be of vec3 type. .. deprecated:: 4.16 GTK's new Vulkan-focused rendering does not support this feature. Use `GtkGLArea <../gtk4/class.GLArea.html>`__ for OpenGL rendering. :param idx: index of the uniform :param value: value to set the uniform too .. method:: set_vec4(idx: int, value: ~gi.repository.Graphene.Vec4) -> None Sets the value of the uniform ``idx``\. The uniform must be of vec4 type. .. deprecated:: 4.16 GTK's new Vulkan-focused rendering does not support this feature. Use `GtkGLArea <../gtk4/class.GLArea.html>`__ for OpenGL rendering. :param idx: index of the uniform :param value: value to set the uniform too .. method:: to_args() -> ~gi.repository.GLib.Bytes 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 :obj:`~gi.repository.Gsk.ShaderArgsBuilder.free_to_args`\. .. deprecated:: 4.16 GTK's new Vulkan-focused rendering does not support this feature. Use `GtkGLArea <../gtk4/class.GLArea.html>`__ for OpenGL rendering.