drawVAO(vao, mode=4, start=0, count=None, instanceCount=None, flush=False)¶
Draw a vertex array object. Uses glDrawArrays or glDrawElements if instanceCount is None, or else glDrawArraysInstanced or glDrawElementsInstanced is used.
vao (VertexArrayObject) – Vertex Array Object (VAO) to draw.
mode (int, optional) – Drawing mode to use (e.g. GL_TRIANGLES, GL_QUADS, GL_POINTS, etc.)
start (int, optional) – Starting index for array elements. Default is 0 which is the beginning of the array.
count (int, optional) – Number of indices to draw from start. Must not exceed vao.count - start.
flush (bool, optional) – Flush queued drawing commands before returning.
Creating a VAO and drawing it:
# draw the VAO, renders the mesh drawVAO(vaoDesc, GL.GL_TRIANGLES)