1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
13 : close-path ( points -- points' )
16 : <polygon> ( color points -- polygon )
17 dup close-path [ [ concat >float-array ] [ length ] bi ] bi@
20 M: polygon draw-boundary
23 [ boundary-vertices>> gl-vertex-pointer ]
24 [ [ GL_LINE_STRIP 0 ] dip boundary-count>> glDrawArrays ]
27 M: polygon draw-interior
30 [ interior-vertices>> gl-vertex-pointer ]
31 [ [ GL_POLYGON 0 ] dip interior-count>> glDrawArrays ]