Cogl.Attribute.new_const_3fv
function new_const_3fv(context: Cogl.Context, name: String, value: Number(gfloat)): Cogl.Attribute { // Gjs wrapper for cogl_attribute_new_const_3fv() }
Creates a new, 3 component, attribute whose value remains constant across all the vertices of a primitive without needing to duplicate the value for each vertex.
The constants (value[0], value[1], value[2]) represent a 3 component float vector which should have a corresponding declaration in GLSL code like:
[| attribute vec3 name; |]
unless the built in name "cogl_normal_in" is being used where no explicit GLSL declaration need be made.
- context
- name
The name of the attribute (used to reference it from GLSL)
- value
A pointer to a 3 component float vector
- Returns
A newly allocated Cogl.Attribute representing the given constant vector.