views:

126

answers:

1

I'm trying to make a vector drawing application using OpenGL which will allow the user to see the result in real time. The way I have it set up is with an edge flag callback so the glu tesselator only outputs triangles which I then pass to a VBO. I'v tried t make all my algorithms as fast as possible and this is not where my issue is. According to a few code profilers, my big slowdown occurs in a call to GLUTessEndPolygon() which is the function that makes the polygon. I have found that when the shape exceeds 100 input verticies, it gets really really slow and basically destroys all the hard work I did to optimize everything else. What can I do? I provide the normal of (0,0,1). I also tried all the tips from the GL redbook. Is there a way to make the tesselator tesselate quicker but with less precision?

Thanks

+1  A: 

You might give poly2tri a try to see if it's any faster.

genpfault
Thanks, except, where can I find usage information on it? Also does it need to be compiled as a lib, or can it just be used as is?Thanks
Milo
I just used the [source browser](http://code.google.com/p/poly2tri/source/browse/). It looks like you should be able to just add the files to your project.
genpfault
Can ithave self intersecting polygons?
Milo
What about the General Polygon Clipper?
Milo