Cogl.Attribute.new_const_4f

function new_const_4f(context: Cogl.Context, name: String, component0: Number(gfloat), component1: Number(gfloat), component2: Number(gfloat), component3: Number(gfloat)): Cogl.Attribute {
    // Gjs wrapper for cogl_attribute_new_const_4f()
}
  

Creates a new, 4 component, attribute whose value remains constant across all the vertices of a primitive without needing to duplicate the value for each vertex.

The constants (component0, component1, component2, @constant3) represent a 4 component float vector which should have a corresponding declaration in GLSL code like:

[| attribute vec4 name; |]

unless one of the built in names "cogl_color_in", "cogl_tex_coord0_in or "cogl_tex_coord1_in" etc is being used where no explicit GLSL declaration need be made.

context

A Cogl.Context

name

The name of the attribute (used to reference it from GLSL)

component0

The first component of a 4 component vector

component1

The second component of a 4 component vector

component2

The third component of a 4 component vector

component3

The fourth component of a 4 component vector

Returns

A newly allocated Cogl.Attribute representing the given constant vector.