GL_APICALL void GL_APIENTRY glDrawArrays(
GLenum mode,
GLint first,
GLsizei count
);
| Name | Description | |
|---|---|---|
| in | mode | Primitive mode |
| in | first | Starting index of the array of vertex data to render |
| in | count | Amount of vertex data to render |
Uses a vertex array to render primitives.
Accesses a vertex data array in order.
Set mode to one of the following values when the geometry shader is not in use.
| GL_TRIANGLES | Triangles |
|---|---|
| GL_TRIANGLE_STRIP | Triangle strip |
| GL_TRIANGLE_FAN | Triangle fan |
Specify a value of GL_GEOMETRY_PRIMITIVE_DMP when the geometry shader is in use.
This function generates the following errors.
| GL_INVALID_ENUM | The mode argument was set to an invalid value. |
|---|---|
| GL_INVALID_FRAMEBUFFER_OPERATION | The framebuffer was configured incorrectly. |
| GL_INVALID_OPERATION | This function was called without any command-list objects bound. |
| GL_INVALID_OPERATION | The mode argument was either set to GL_GEOMETRY_PRIMITIVE_DMP when a geometry shader had not been linked to the current program, or it was set to a value other than GL_GEOMETRY_PRIMITIVE_DMP when a geometry shader had been linked to the current program. |
CONFIDENTIAL