Cogl.Attribute.new_const_4x4fv

function new_const_4x4fv(context: Cogl.Context, name: String, matrix4x4: Number(gfloat), transpose: Cogl.Bool): Cogl.Attribute {
    // Gjs wrapper for cogl_attribute_new_const_4x4fv()
}
  

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

matrix4x4 represent a square 4 by 4 matrix specified in column-major order (each 4-tuple of consecutive numbers represents a column) which should have a corresponding declaration in GLSL code like:

[| attribute mat4 name; |]

If transpose is true then all matrix components are rotated around the diagonal of the matrix such that the first column becomes the first row and the second column becomes the second row etc.

context

A Cogl.Context

name

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

matrix4x4

A pointer to a 4 by 4 matrix

transpose

Whether the matrix should be transposed on upload or not

Returns

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