In this example, from the programming guide[1], the indexes 2 and 3 don't 
seem to be doing anything useful. I can remove them and the output doesn't 
change, or change them to 5 and 6 with no effect. It seems like the writer 
got slightly confused and was trying to index the coordinates rather than 
the vertices? I believe the 2 and 3 are out-of-bounds indexes, and gl is 
igoring them rather than throwing an error, which surprises me, but I'm not 
at all experienced.

Please correct me if I'm wrong. 

Vertices can also be drawn out of order and more than once by using the 
> pyglet.graphics.draw_indexed<http://www.pyglet.org/doc/api/pyglet.graphics-module.html#draw_indexed>
>  function. 
> This requires a list of integers giving the indices into the vertex data. 
> The following example draws the same two points as above, but indexes the 
> vertices (sequentially):
>
 

pyglet.graphics.draw_indexed(2, pyglet.gl.GL_POINTS,
>     [0, 1, 2, 3],
>     ('v2i', (10, 15, 30, 35))
> )


[1] http://www.pyglet.org/doc/programming_guide/drawing_primitives.html 

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pyglet-users/-/YoYVgxX_nGoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to