pouët.net

Go to bottom

tesselated filled bezier curves

category: code [glöplog]
 
the 2D kind - like used in SVG etc, these are really difficult to do in OpenGL/DX with tesselation.

Seems like noone has done it properly... Or am I that bad at googling?

That is. self-overlapping/intersecting curves.. Anyway, looks like it could be a good thing for a fragment shader...
added on the 2010-03-05 15:52:47 by jaw jaw
You can perhaps use a well known stencil buffer approach to draw concave/self-intersecting polygons. It is mentioned in the OpenGL Red Book. That makes drawing complex polygons relatively painless and puts all the load on the GPU. It might not be ideal for all polygons though and it consumes some fill rate.
added on the 2010-03-05 17:01:13 by loaderror loaderror
yes I know about that one.. is OK but not a perfect solution that works with everything else regardless of situation... so no, it needs to be tesselated somehow.
added on the 2010-03-05 17:35:13 by jaw jaw
You can try to implement a Seidel tessellator, but the problem here is that most are content with implementing a basic routine which doesn't handle the tonnes of special cases and ambiguities which can occur with general polygons. I've never found a document which describes how to handle these in full detail.

There are open source variants of the tessellator in GLU (gluTess). Maybe you can have a look at one of these for inspiration on how to implement this?
added on the 2010-03-05 17:54:47 by loaderror loaderror

login

Go to top