通过索引方式来绘制几何图元。
void glDrawElements( GLenum mode, GLsizei count, GLenum type, const GLvoid * indices);
mode
Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted. count
Specifies the number of elements to be rendered.
指定绘制图元的拓扑关系。 type
Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT.
指定缓冲区中索引值的类型。 indices
Specifies a pointer to the location where the indices are stored.
指定索引在缓冲区的起始位置。