 | VertexAttribute.SetConfig<T> Method (Int32, Int32) |
Namespace:
Ooogles
Assembly:
Ooogles (in Ooogles.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic void SetConfig<T>(
int stride = 0,
int offset = 0
)
where T : struct, new()
Public Sub SetConfig(Of T As {Structure, New}) (
Optional stride As Integer = 0,
Optional offset As Integer = 0
)
public:
generic<typename T>
where T : value class, gcnew()
void SetConfig(
int stride = 0,
int offset = 0
)
member SetConfig :
?stride : int *
?offset : int
(* Defaults:
let _stride = defaultArg stride 0
let _offset = defaultArg offset 0
*)
-> unit when '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.
ExceptionsException | Condition |
---|
GLException | InvalidValue 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