On Sat, Apr 26, 2008 at 7:50 PM, Menno <[EMAIL PROTECTED]> wrote:
>
>  Hello,
>  I'm having some trouble with batch rendering. With GL_TRIANGLES adding
>  two seperate objects (vertexlists) batches is no problem. When I use
>  TRIANGLE_STRIP or TRIANGLE_FAN, however, the two objects get
>  "connected" (looks like a triangle is going from object A to object
>  B). Here's an example where it goes wrong:
>
>  batch,add(3, GL_TRIANGLE_STRIP, None, ('v2i', (10, 15, 30, 35, 30,
>  15)), ('c3B', (255,0,0,255,0,0,255,0,0)) )
>  batch,add(3, GL_TRIANGLE_STRIP, None, ('v2i', (40, 45, 60, 65, 60,
>  45)), ('c3B', (255,0,0,255,0,0,255,0,0)) )
>
>  Any ideas?

You need to insert degenerate triangles when using GL_TRIANGLE_STRIP,
GL_TRIANGLE_FAN and GL_QUAD_STRIP.  An example is given in the module
docstring: http://pyglet.org/doc/1.1/api/pyglet.graphics-module.html

Alex.

--~--~---------~--~----~------------~-------~--~----~
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