summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lc/Builtins.lc6
-rw-r--r--testdata/accept/helloWorld.lc12
2 files changed, 11 insertions, 7 deletions
diff --git a/lc/Builtins.lc b/lc/Builtins.lc
index 96a313d2..9150691d 100644
--- a/lc/Builtins.lc
+++ b/lc/Builtins.lc
@@ -574,10 +574,14 @@ texture2D :: Sampler -> Vec 2 Float -> Vec 4 Float
574 574
575rasterize = Rasterize 575rasterize = Rasterize
576filterFragmentStream = FilteredFragmentStream 576filterFragmentStream = FilteredFragmentStream
577fragmentShaderRastDepth f = Fragments (FragmentShaderRastDepth f) 577transformFragmentsRastDepth f = Fragments (FragmentShaderRastDepth f)
578accumulateWith ctx x = (ctx, x) 578accumulateWith ctx x = (ctx, x)
579overlay cl (ctx, str) = Accumulate ctx str cl 579overlay cl (ctx, str) = Accumulate ctx str cl
580transformVertices f s = Transform (\v -> VertexOut (f v) 1 () (Smooth v)) s 580transformVertices f s = Transform (\v -> VertexOut (f v) 1 () (Smooth v)) s
581renderFrame = ScreenOut
582imageFrame = FrameBuffer
583emptyDepthImage = DepthImage @1
584emptyColorImage = ColorImage @1
581 585
582infixl 0 `overlay` 586infixl 0 `overlay`
583 587
diff --git a/testdata/accept/helloWorld.lc b/testdata/accept/helloWorld.lc
index e8f599cc..f99d3088 100644
--- a/testdata/accept/helloWorld.lc
+++ b/testdata/accept/helloWorld.lc
@@ -1,17 +1,17 @@
1 1
2pipeline (projmat :: Mat 4 4 Float) 2makeFrame (projmat :: Mat 4 4 Float)
3 (vertexstream :: VertexStream Triangle (Vec 4 Float)) 3 (vertexstream :: VertexStream Triangle (Vec 4 Float))
4 4
5 = FrameBuffer (DepthImage @1 1000, ColorImage @1 navy) 5 = imageFrame (emptyDepthImage 1000, emptyColorImage navy)
6 `overlay` 6 `overlay`
7 vertexstream 7 vertexstream
8 & transformVertices (scale 0.5 . (projmat *.)) 8 & transformVertices (scale 0.5 . (projmat *.))
9 & rasterize (TriangleCtx CullNone PolygonFill NoOffset LastVertex) 9 & rasterize (TriangleCtx CullNone PolygonFill NoOffset LastVertex)
10 & filterFragmentStream PassAll 10 & filterFragmentStream PassAll
11 & fragmentShaderRastDepth (\x -> x) 11 & transformFragmentsRastDepth (\x -> x)
12 & accumulateWith (DepthOp Less True, ColorOp NoBlending (V4 True True True True)) 12 & accumulateWith (DepthOp Less True, ColorOp NoBlending (V4 True True True True))
13 13
14main = ScreenOut $ 14main = renderFrame $
15 pipeline (Uniform "MVP") 15 makeFrame (Uniform "MVP")
16 (Fetch "stream4" (Attribute "position4")) 16 (Fetch "stream4" (Attribute "position4"))
17 17