WindfoilMap
GPU storage for shapes drawn with the windfoil algorithm, which computes the box filtered coverage of a pixel from the winding integral of the curves of a shape over the pixel. Shapes are split in pieces that are monotone in x and y, which are filed in horizontal bands.
curves holds three texels per piece (start, control and end point) and must be an RG FLOAT32 color buffer. rows holds two texels per band and must be an RGBa UINT32_INT color buffer, with the first piece and the number of pieces of the band, and the ink profile of the band: its winding density and the x range of its pieces. Both are addressed as flat arrays in rows of the width of the color buffer.
Functions
Starts a batch, in which shapes are uploaded to the GPU once endBatch is called instead of after each shape