 | glDrawElements Method (glPrimitiveType, Int32, glIndexType) |
Render primitives from array data, using indices from a bound index buffer.
Namespace:
Ooogles
Assembly:
Ooogles (in Ooogles.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static void DrawElements(
glPrimitiveType type,
int count,
glIndexType indexType
)
Public Shared Sub DrawElements (
type As glPrimitiveType,
count As Integer,
indexType As glIndexType
)
public:
static void DrawElements(
glPrimitiveType type,
int count,
glIndexType indexType
)
static member DrawElements :
type : glPrimitiveType *
count : int *
indexType : glIndexType -> unit
Parameters
- type
- Type: OooglesglPrimitiveType
specifies what kind of primitives to render. - count
- Type: SystemInt32
the number of indices used to render. - indexType
- Type: OooglesglIndexType
the type of the indices in the bound index buffer. Only 8-bit (UnsignedByte) and 16-bit (UnsignedShort) indices are supported.
ExceptionsException | Condition |
---|
GLException | InvalidFramebufferOperation if the currently bound framebuffer is not framebuffer complete. |
Remarks
DrawElements specifies multiple geometric primitives with very few subroutine calls.
Instead of calling a GL function to pass each vertex attribute, you can use
VertexAttribute to prespecify
separate arrays of vertex attributes and use them to construct a sequence of primitives with a single call to DrawElements.
type specifies what kind of primitives are constructed and how the array elements construct these primitives.
If more than one array is enabled, each is used.
To enable and disable a 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: glDrawElements
See Also