On Tue, Jul 14, 2009 at 9:32 AM, Jonathan Hartley <[email protected]>wrote:

>
> Hi all,
>
> I have an OpenGL primitives in Batches sort of question.
>
> I've stolen the gluTessellate code from the brillliant Squirtle, and
> am using it to tessellate 2D polygons read from svg files, and create
> pyglet Batch objects of indexed arrays. This works fine.
>
> However, I notice that in tessellating a single svg path (A path
> contains one or more loops - representing holes, or maybe disjoint
> islands.) the glu functions are producing a mixture of several
> GL_TRIANGLE_FANS, several GL_TRIANGLE_STRIPS and several GL_TRIANGLES.



 ...


The
glu tesselation functions were designed long before the number of draw
calls was ever considered as a potential bottleneck, and at that time
vertex processing was the bottleneck. Unfortunately,
the entire of glu has been deprecated, so it is unlikely to receive any
improvements in this area.
The alternative, I am afraid, is to roll your own tessellation functions.
This isn't actually that hard, and has the benefit that you will have
complete control of the output, but it will be a bit of work.

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