summaryrefslogtreecommitdiff
path: root/testdata/accumulate01.reject.lc
blob: 9807280a1b2a8a739231398d8afb4b1da6908642 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
main = let
  emptyFB           = FrameBuffer (colorImage1 (V4 0.0 0.0 0.4 1.0))
  rasterCtx         = TriangleCtx CullNone PolygonFill NoOffset LastVertex
  colorOp           = ColorOp NoBlending (V4 True True True True)
  fragmentCtx       = colorOp
  vertexShader v    = (v%xyz, v)
  vertexStream      = fetch "stream" Triangle (Attribute "position" :: Vec 4 Float)
  primitiveStream   = mapPrimitives vertexShader vertexStream
  fragmentStream    = rasterizePrimitives rasterCtx Smooth primitiveStream
  fragmentShader    = \v -> (V4 1.0 0.0 0.0 1.0)
  frame             = accumulate fragmentCtx fragmentShader fragmentStream emptyFB
 in ScreenOut frame