You can't batch line strips at all, unless your card supports one of the
fence extensions, which lets you specify the end of a primitive list. I
would suggest you just use GL_LINES - the duplicate vertices shouldn't hurt
performance too much.

On Tue, Mar 31, 2009 at 10:43 AM, Leonardo Santagada <[email protected]>wrote:

>
> I tried creating a batch to draw many lines at the same time, but even
> with the idea of creating degenerate polygons (in this case lines) the
> lines are still connected between them. Is there something speciall
> about them or not?
>
> the code I'm using is more or less:
>
> bpoints = [x1, y1, x2, y2, x3, y3]
> points = bpoints[0:2] + bpoints + bpoints[-2:]
> size = len(points)/2
> r, g, b = COLOR[edge.color]
> pyglet.graphics.vertex_list(size,
>                ('v2f/static', points),
>                ('c4B/statoc', [r, g, b, 255] * size)))
>
> of course before I was adding them to a batch and not creating a
> vertex_list.
> >
>


-- 
Tristam MacDonald
http://swiftcoder.wordpress.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
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