Click or drag to resize

VertexAttribute.SetConfig<T> Method (Int32, Int32)

Sets up the attribute for use with a DataBuffer (of type Vertex).

Namespace:  Ooogles
Assembly:  Ooogles (in Ooogles.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public void SetConfig<T>(
	int stride = 0,
	int offset = 0
)
where T : struct, new()

Parameters

stride (Optional)
Type: System.Int32
(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.
offset (Optional)
Type: System.Int32
(optional) byte offset into the buffer object's data store. Defaults to 0.

Type Parameters

T
The type to use for this vertex attribute.
Exceptions
ExceptionCondition
GLExceptionInvalidValue if stride is negative.
Remarks
That is, this attribute will be part of a VBO (Vertex Buffer Object). When this attribute is not part of a VBO, then you should use SetData(VertexAttribute.DataType, Int32, Void*, Int32, Boolean) instead.

Type parameter {T} must be of an integral or floating-point type, or of type Vector2, Vector3 or Vector4.

The overloaded version SetConfig(VertexAttribute.DataType, Int32, Int32, Int32) is more efficient.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if no DataBuffer of type Vertex is bound.

OpenGL API: glVertexAttribPointer

See Also

Reference