Attribute.const_3f


Description:

public Attribute.const_3f (Context context, string name, float component0, float component1, float component2)

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 (component0, component1, component2) 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.

Parameters:

context

A Context

name

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

component0

The first component of a 3 component vector

component1

The second component of a 3 component vector

component2

The third component of a 3 component vector

Returns:

A newly allocated Attribute representing the given constant vector.