Constructor
CoglAttributenew_const_1f
Declaration [src]
CoglAttribute*
cogl_attribute_new_const_1f (
CoglContext* context,
const char* name,
float value
)
Description [src]
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
-
Type:
CoglContext
A
CoglContext
.The data is owned by the caller of the function. name
-
Type:
const char*
The name of the attribute (used to reference it from GLSL).
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. value
-
Type:
float
The constant value for the attribute.
Return value
Type: CoglAttribute
A newly allocated CoglAttribute
representing the given constant value
.
The caller of the function takes ownership of the data, and is responsible for freeing it. |