JOGL Tesselator port

Source: http://people.freenet.de/ki_onyx/Tesselator.zip (80kb)

7zipped class files are about 40kb… it’s ok I guess :wink:

As far as I can tell it works. However it would be nice if someone who knows what he’s doing (e.g. not me) takes a look. Some refactoring might be a good idea.

Oh and I’d to guess at one place:
public static final float GLU_TESS_MAX_COORD = 1.0e15f;
(GLU_OVERRIDE.java)

In the root dir of the zip file is a little demo, called “Tess.java”. I hadn’t adjusted the projection stuff, but both thingies are visible.

Good work.
I never used glu tesselation stuff myself, so I don’t know how well it works. So I just take your word for it :slight_smile:
The source looks okay to me.

The code that’s in Jogl is a port to Java I made of the SGI reference implementation. It’s essentially identical to the SGI implementation except that I disabled an optimized code path that generated incorrect results for one of the tesselator examples in the red book. I didn’t put any time in actually figuring out how the algorithm itself works, but you should be able to piece it together from the comments in the code.

optimized code path

Hehe… well, right now it’s a single on-level-load operation and I don’t really care if it takes 50msec or 200 :wink:

I didn’t put any time in actually figuring out how the algorithm itself works

Neither do I (and I mean the whole thing). Slapped it together in ~3h (there is no way that I could understand ~230kb source in that timespan).

Oh and since you are here. Thanks for your effort :slight_smile: