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/Hyperboloid.lc | |
parent | 27c8f3aeb2d13da0bec522ee8a8a98f534fa39e8 (diff) |
tuples are heterogeneous lists
Diffstat (limited to 'testdata/Hyperboloid.lc')
-rw-r--r-- | testdata/Hyperboloid.lc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/testdata/Hyperboloid.lc b/testdata/Hyperboloid.lc index e6ae104a..44cbcb68 100644 --- a/testdata/Hyperboloid.lc +++ b/testdata/Hyperboloid.lc | |||
@@ -1,5 +1,5 @@ | |||
1 | lineVertexStream = fetchArrays Line $ concat $ | 1 | lineVertexStream = fetchArrays Line ((concat $ |
2 | [[V3 i (-3.0) 0.0, V3 i 3.0 0.0] | i <- [(-5.0)..5.0] ] | 2 | [[V3 i (-3.0) 0.0, V3 i 3.0 0.0] | i <- [(-5.0)..5.0] ])) |
3 | 3 | ||
4 | clear = FrameBuffer $ (DepthImage @1 1000, ColorImage @1 white) -- ... | 4 | clear = FrameBuffer $ (DepthImage @1 1000, ColorImage @1 white) -- ... |
5 | 5 | ||
@@ -10,8 +10,8 @@ m = Uniform "Mouse" :: Vec 2 Float | |||
10 | 10 | ||
11 | rasterizeWith = rasterizePrimitives | 11 | rasterizeWith = rasterizePrimitives |
12 | 12 | ||
13 | mapFragments22 s fs = accumulate colorFragmentCtx (\a -> fs a) s clear | 13 | mapFragments22 s fs = accumulate colorFragmentCtx (\((a)) -> ((fs a))) s clear |
14 | transform s f = mapPrimitives (\(p) -> let v = v3FToV4F p in (f v, v)) s | 14 | transform s f = mapPrimitives (\((p)) -> let v = v3FToV4F p in (f v, v)) s |
15 | 15 | ||
16 | trans :: Vec 4 Float -> Vec 4 Float | 16 | trans :: Vec 4 Float -> Vec 4 Float |
17 | trans (V4 x y _ _) = V4 (k * sin (s * x + r * y)) y (k * cos (s * x + r * y)) 1.0 | 17 | trans (V4 x y _ _) = V4 (k * sin (s * x + r * y)) y (k * cos (s * x + r * y)) 1.0 |
@@ -24,6 +24,6 @@ rotate' v = (Uniform "MVP" :: Mat 4 4 Float) *. v | |||
24 | 24 | ||
25 | main = lineVertexStream | 25 | main = lineVertexStream |
26 | `transform` ((scale 0.1 . rotate') . trans) | 26 | `transform` ((scale 0.1 . rotate') . trans) |
27 | & rasterizeWith lines Smooth | 27 | & rasterizeWith lines ((Smooth)) |
28 | `mapFragments22` id | 28 | `mapFragments22` id |
29 | & ScreenOut | 29 | & ScreenOut |