Attribute.const_2fv


Description:

public Attribute.const_2fv (Context context, string name, float value)

Creates a new, 2 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]) represent a 2 component float vector which should have a corresponding declaration in GLSL code like:

[| attribute vec2 name; |]

Parameters:

context

A Context

name

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

value

A pointer to a 2 component float vector

Returns:

A newly allocated Attribute representing the given constant vector.