Attribute.const_1f


Description:

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

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; |]

Parameters:

context

A Context

name

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

value

The constant value for the attribute

Returns:

A newly allocated Attribute representing the given constant value.