Click or drag to resize

VertexAttributeSetDataT Method (VertexAttributeDataType, Int32, T, Int32, Boolean)

Sets up the attribute for use with client data.

Namespace:  Ooogles
Assembly:  Ooogles (in Ooogles.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public void SetData<T>(
	VertexAttributeDataType dataType,
	int numValuesPerVertex,
	T[] data,
	int stride = 0,
	bool normalized = false
)
where T : struct, new()

Parameters

dataType
Type: OooglesVertexAttributeDataType
the data type of the each component of the vertex attribute. For example, an attribute of type Vector3 contains components of type Float.
numValuesPerVertex
Type: SystemInt32
the number of values (components) of the vertex attribute. For example, an attribute of type Vector3 contains 3 values. Valid values are 1, 2, 3 and 4.
data
Type: T
client data array containing the vertices.
stride (Optional)
Type: SystemInt32
(optional) byte offset between consecutive vertex attributes. If stride is 0 (the default), the generic vertex attributes are understood to be tightly packed in the array.
normalized (Optional)
Type: SystemBoolean
(optional) flag that specifies whether integer values will be normalized. If set to True, integer values are be mapped to the range [-1,1] (for signed values) or [0,1] (for unsigned values) when they are accessed and converted to floating point. Otherwise (default), values will be converted to floats directly without normalization.

Type Parameters

T
The type of elements in the data array.
Exceptions
ExceptionCondition
GLExceptionInvalidValue if numValuesPerVertex is not 1, 2, 3 or 4.
GLExceptionInvalidValue if stride is negative.
Remarks
See Also

Reference