Cogl.Attribute.new_const_1f

function new_const_1f(context: Cogl.Context, name: String, value: Number(gfloat)): Cogl.Attribute {
    // Gjs wrapper for cogl_attribute_new_const_1f()
}
  

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

The constant value is a single precision floating point scalar which should have a corresponding declaration in GLSL code like:

[| attribute float name; |]

context

A Cogl.Context

name

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

value

The constant value for the attribute

Returns

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