makeFrame (projmat :: Mat 4 4 Float) (vertexstream :: PrimitiveStream Triangle ((Vec 4 Float))) = imageFrame (emptyDepthImage 1, emptyColorImage navy) `overlay` fragments where fragments = vertexstream & mapPrimitives (\((x)) -> (scale 0.5 (projmat *. x), x, x, x, x)) -- HERE: must support tuples up to 5 & rasterizePrimitives (TriangleCtx CullNone PolygonFill NoOffset LastVertex) (Smooth,Smooth,Smooth,Smooth) & mapFragments (\(x,_,_,_) -> x) & accumulateWith (DepthOp Less True, ColorOp NoBlending (V4 True True True True)) main = renderFrame $ makeFrame (Uniform "MVP") (fetch "stream4" (Attribute "position4"))