summaryrefslogtreecommitdiff
path: root/testdata/Hyperboloid.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/Hyperboloid.lc
parent27c8f3aeb2d13da0bec522ee8a8a98f534fa39e8 (diff)
tuples are heterogeneous lists
Diffstat (limited to 'testdata/Hyperboloid.lc')
-rw-r--r--testdata/Hyperboloid.lc10
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 @@
1lineVertexStream = fetchArrays Line $ concat $ 1lineVertexStream = 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
4clear = FrameBuffer $ (DepthImage @1 1000, ColorImage @1 white) -- ... 4clear = FrameBuffer $ (DepthImage @1 1000, ColorImage @1 white) -- ...
5 5
@@ -10,8 +10,8 @@ m = Uniform "Mouse" :: Vec 2 Float
10 10
11rasterizeWith = rasterizePrimitives 11rasterizeWith = rasterizePrimitives
12 12
13mapFragments22 s fs = accumulate colorFragmentCtx (\a -> fs a) s clear 13mapFragments22 s fs = accumulate colorFragmentCtx (\((a)) -> ((fs a))) s clear
14transform s f = mapPrimitives (\(p) -> let v = v3FToV4F p in (f v, v)) s 14transform s f = mapPrimitives (\((p)) -> let v = v3FToV4F p in (f v, v)) s
15 15
16trans :: Vec 4 Float -> Vec 4 Float 16trans :: Vec 4 Float -> Vec 4 Float
17trans (V4 x y _ _) = V4 (k * sin (s * x + r * y)) y (k * cos (s * x + r * y)) 1.0 17trans (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
25main = lineVertexStream 25main = 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