glDrawArrays

render primitives from array data

Signature

glDrawArrays( GLenum ( mode ) , GLint ( first ) , GLsizei ( count ) )-> void
glDrawArrays( mode , first , count )

Parameters

VariablesDescription
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.
first
Specifies the starting index in the enabled arrays.
count
Specifies the number of indices to be rendered.

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glDrawArrays
OpenGLContext tests/gldrawarrays.py Lines: 20
OpenGLContext tests/shader_3.py Lines: 171
OpenGLContext tests/shader_2.py Lines: 184
OpenGLContext tests/shader_spike.py Lines: 88
OpenGLContext tests/shader_2_c_void_p.py Lines: 64
OpenGLContext tests/line_stipple.py Lines: 36
OpenGLContext tests/gldrawarrays_string.py Lines: 18
OpenGLContext tests/shader_5.py Lines: 314
OpenGLContext tests/shader_1.py Lines: 267
OpenGLContext tests/pygame_textureatlas.py Lines: 147
OpenGLContext tests/shader_4.py Lines: 161
OpenGLContext OpenGLContext/drawcube.py Lines: 37, 52
OpenGLContext OpenGLContext/scenegraph/box.py Lines: 44, 55
OpenGLContext OpenGLContext/scenegraph/shaders.py Lines: 618, 624
OpenGLContext OpenGLContext/scenegraph/pointset.py Lines: 79
OpenGLContext OpenGLContext/scenegraph/text/toolsfont.py Lines: 31, 165
OpenGLContext OpenGLContext/shadow/volume.py Lines: 297, 307
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/arraytest.py Lines: 46
OpenGL-Demo PyOpenGL-Demo/tom/arraytest.py Lines: 32
OpenGL-Demo PyOpenGL-Demo/tom/poly.py Lines: 45
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 454
OpenGL-Demo PyOpenGL-Demo/da/dots.py Lines: 59
{LGPL} PyMT pymt/obj.py Lines: 20, 113
{LGPL} Pyggel pyggel/data.py Lines: 260, 385
OpenGL Tutorial (Python Translation) t02.playing-with-colors/FragPosition.py Lines: 90
OpenGL Tutorial (Python Translation) t02.playing-with-colors/VertexColors.py Lines: 95
OpenGL Tutorial (Python Translation) t01.hello-triangle/HelloTriangle.py Lines: 104
Visvis wibjects/colorWibjects.py Lines: 543, 549, 554, 757
Visvis wibjects/sliders.py Lines: 352, 355, 412
Visvis core/axises.py Lines: 793, 807, 838, 2025, 2032
Visvis core/line.py Lines: 690, 755, 771, 776, 791, 796, 836, 847
Visvis core/baseWibjects.py Lines: 199
Visvis wobjects/polygonalModeling.py Lines: 1055
Visvis wobjects/textures.py Lines: 965
Visvis functions/boxplot.py Lines: 333
Visvis functions/bar.py Lines: 168, 175
Visvis text/text_base.py Lines: 261