Adds a new vertex buffer object as part of this vertex state. If an exception is thrown, the state is reset to what it was before the method was called.

Namespace: HighGL
Assembly: HighGL (in HighGL.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public void AddVertexBufferObject(
	float[] data,
	int size,
	int index
)
Visual Basic
Public Sub AddVertexBufferObject ( _
	data As Single(), _
	size As Integer, _
	index As Integer _
)
Visual C++
public:
void AddVertexBufferObject(
	array<float>^ data, 
	int size, 
	int index
)

Parameters

data
Type: array<System..::..Single>[]()[][]
The buffer data. Must have size * n entries.
size
Type: System..::..Int32
The vertex size (i.e., 4 if one vertex is (x,y,z,w).
index
Type: System..::..Int32
The index of the shader variable the data should be bound to. Must be positive.

Exceptions

ExceptionCondition
System..::..ObjectDisposedExceptionIf this object was disposed.
System..::..ArgumentNullExceptionIf data is null.
System..::..ArgumentOutOfRangeExceptionIf the length of data is not size * n.
System..::..ArgumentOutOfRangeExceptionIf index is negative.
HighGL..::..GLErrorExceptionIf a GL error occurs on VBO initialization.

See Also