summaryrefslogtreecommitdiff
path: root/testdata/example07.lc
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-02-18 18:34:47 +0100
committerPéter Diviánszky <divipp@gmail.com>2016-02-19 02:50:09 +0100
commit998ae8f884f4b1d4e092ebdf3a441b97b2cf05b7 (patch)
tree6ced17ee38fa78de69b05c8765288ecabe52fb6e /testdata/example07.lc
parent27c8f3aeb2d13da0bec522ee8a8a98f534fa39e8 (diff)
tuples are heterogeneous lists
Diffstat (limited to 'testdata/example07.lc')
-rw-r--r--testdata/example07.lc8
1 files changed, 4 insertions, 4 deletions
diff --git a/testdata/example07.lc b/testdata/example07.lc
index f34eebdd..7372a819 100644
--- a/testdata/example07.lc
+++ b/testdata/example07.lc
@@ -8,14 +8,14 @@ colorFragmentCtx = (DepthOp Less True, ColorOp NoBlending (V4 True True True Tru
8rasterizeWith = rasterizePrimitives 8rasterizeWith = rasterizePrimitives
9triangles = triangleRasterCtx 9triangles = triangleRasterCtx
10 10
11cubeVertexStream = fetch "stream4" Triangle (Attribute "position4" :: Vec 4 Float) 11cubeVertexStream = fetch "stream4" Triangle (Attribute "position4" :: ((Vec 4 Float)))
12mapFragments2 s fs = accumulate colorFragmentCtx (\a -> fs a) s clear 12mapFragments2 s fs = accumulate colorFragmentCtx (\((a)) -> ((fs a))) s clear
13transform s f = mapPrimitives (\v -> (f v, v)) s 13transform s f = mapPrimitives (\((v)) -> (f v, v)) s
14 14
15rotate' v = (Uniform "MVP" :: Mat 4 4 Float) `PrimMulMatVec` v 15rotate' v = (Uniform "MVP" :: Mat 4 4 Float) `PrimMulMatVec` v
16 16
17main = cubeVertexStream -- cube vertices 17main = cubeVertexStream -- cube vertices
18 `transform` (scale 0.5 . rotate') -- scale them 18 `transform` (scale 0.5 . rotate') -- scale them
19 & rasterizeWith triangles Smooth -- rasterize 19 & rasterizeWith triangles ((Smooth)) -- rasterize
20 `mapFragments2` (\a -> if a%r < 0.5 then blue else red) 20 `mapFragments2` (\a -> if a%r < 0.5 then blue else red)
21 & ScreenOut -- draw into screen 21 & ScreenOut -- draw into screen