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