diff options
-rw-r--r-- | lc/Builtins.lc | 6 | ||||
-rw-r--r-- | testdata/accept/helloWorld.lc | 12 |
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 | ||
575 | rasterize = Rasterize | 575 | rasterize = Rasterize |
576 | filterFragmentStream = FilteredFragmentStream | 576 | filterFragmentStream = FilteredFragmentStream |
577 | fragmentShaderRastDepth f = Fragments (FragmentShaderRastDepth f) | 577 | transformFragmentsRastDepth f = Fragments (FragmentShaderRastDepth f) |
578 | accumulateWith ctx x = (ctx, x) | 578 | accumulateWith ctx x = (ctx, x) |
579 | overlay cl (ctx, str) = Accumulate ctx str cl | 579 | overlay cl (ctx, str) = Accumulate ctx str cl |
580 | transformVertices f s = Transform (\v -> VertexOut (f v) 1 () (Smooth v)) s | 580 | transformVertices f s = Transform (\v -> VertexOut (f v) 1 () (Smooth v)) s |
581 | renderFrame = ScreenOut | ||
582 | imageFrame = FrameBuffer | ||
583 | emptyDepthImage = DepthImage @1 | ||
584 | emptyColorImage = ColorImage @1 | ||
581 | 585 | ||
582 | infixl 0 `overlay` | 586 | infixl 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 | ||
2 | pipeline (projmat :: Mat 4 4 Float) | 2 | makeFrame (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 | ||
14 | main = ScreenOut $ | 14 | main = renderFrame $ |
15 | pipeline (Uniform "MVP") | 15 | makeFrame (Uniform "MVP") |
16 | (Fetch "stream4" (Attribute "position4")) | 16 | (Fetch "stream4" (Attribute "position4")) |
17 | 17 | ||