pcb

Comment 13 for bug 1100620

Revision history for this message
Peter Clifton (pcjc2) wrote :

Just eyeballing the code, it could possibly be the cached polygon geometry causing the problem.

I forgot that I introduced a (crude) cache, and it is expecting to be be able to emit the entire trip-strip set for a given polygon contour in one go.

This will be confirmed if you get an exit backtrace which is something like:

exit
hidgl_ensure_vertex_space
fill_contour (hidgl.c, Approx line 840)
....

This _is_ a bug (probably ought to be filed separately), thanks for catching it!

The solution will be to chunk up the triangle-strip a little when it gets too large. That isn't difficult, as it consists of individual trapezoids and triangles from the polygon rasterisation anyway. These are jointed together with repeated
start and end vertices to form a single tri-strip. (The joints between triangles and/or traps don't render, as the repeated vertices cause them to be zero-width slivers).