Forums > Jitter

drawmatrix polygon ?

Feb 08 2006 | 4:31 pm

hello ,

i`m trying to draw multi points polygon using matrix and .gl.sketch,

as you can see on attached images drawing using line_loop gives

other output than using polygon ,

does it have something to do with order of points in the list?

from the other hand i used jit.lcd before with the same format and

everything was fine,

but i run out of points (i need more than 128)

hopefully i`m missing something obvious, will be grateful for any ideas.



Feb 08 2006 | 8:31 pm

Unfortunately, OpenGL polygon mode does not handle polygons which
either intersect themselves or are not convex. This needs to be done
one level higher than the OpenGL API. We hope to expose closed curves
at some point, but for now, you need to do this yourself–i.e. break
your polygon into chunks which are convex. I’ll try to find time to
make a JS example of taking a list of points that make up a polygon
and breaking it into convex chunks.


Viewing 2 posts - 1 through 2 (of 2 total)

Forums > Jitter