Click or drag to resize

glDrawArrays Method (glPrimitiveType, Int32)

Render primitives from array data, without using indices.

Namespace:  Ooogles
Assembly:  Ooogles (in Ooogles.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static void DrawArrays(
	glPrimitiveType type,
	int count
)

Parameters

type
Type: OooglesglPrimitiveType
specifies what kind of primitives to render.
count
Type: SystemInt32
the number of elements to be rendered.
Exceptions
ExceptionCondition
GLExceptionInvalidValue if count is negative.
GLExceptionInvalidFramebufferOperation if the currently bound framebuffer is not framebuffer complete.
Remarks
DrawArrays specifies multiple geometric primitives with very few subroutine calls. Instead of calling a GL procedure to pass each individual vertex attribute, you can use VertexAttribute to prespecify separate arrays of vertices, normals, and colors and use them to construct a sequence of primitives with a single call to DrawArrays.

When DrawArrays is called, it uses count sequential elements from each enabled array to construct a sequence of geometric primitives, beginning with the first element. type specifies what kind of primitives are constructed and how the array elements construct those primitives.

To enable and disable generic vertex attribute array, call Enable and Disable.

Note: if the current program object, as set by Use, is invalid, rendering results are undefined. However, no error is generated for this case.

OpenGL API: glDrawArrays

See Also