diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-02-18 18:34:47 +0100 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-02-19 02:50:09 +0100 |
commit | 998ae8f884f4b1d4e092ebdf3a441b97b2cf05b7 (patch) | |
tree | 6ced17ee38fa78de69b05c8765288ecabe52fb6e /testdata/example07.lc | |
parent | 27c8f3aeb2d13da0bec522ee8a8a98f534fa39e8 (diff) |
tuples are heterogeneous lists
Diffstat (limited to 'testdata/example07.lc')
-rw-r--r-- | testdata/example07.lc | 8 |
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 | |||
8 | rasterizeWith = rasterizePrimitives | 8 | rasterizeWith = rasterizePrimitives |
9 | triangles = triangleRasterCtx | 9 | triangles = triangleRasterCtx |
10 | 10 | ||
11 | cubeVertexStream = fetch "stream4" Triangle (Attribute "position4" :: Vec 4 Float) | 11 | cubeVertexStream = fetch "stream4" Triangle (Attribute "position4" :: ((Vec 4 Float))) |
12 | mapFragments2 s fs = accumulate colorFragmentCtx (\a -> fs a) s clear | 12 | mapFragments2 s fs = accumulate colorFragmentCtx (\((a)) -> ((fs a))) s clear |
13 | transform s f = mapPrimitives (\v -> (f v, v)) s | 13 | transform s f = mapPrimitives (\((v)) -> (f v, v)) s |
14 | 14 | ||
15 | rotate' v = (Uniform "MVP" :: Mat 4 4 Float) `PrimMulMatVec` v | 15 | rotate' v = (Uniform "MVP" :: Mat 4 4 Float) `PrimMulMatVec` v |
16 | 16 | ||
17 | main = cubeVertexStream -- cube vertices | 17 | main = 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 |