diff options
author | Joe Crayne <joe@jerkface.net> | 2019-05-26 00:59:50 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2019-05-26 00:59:50 -0400 |
commit | 8e735080a3f45a90f9952f1ff883260b1230fdf1 (patch) | |
tree | 3749f150caf6f3e1822a252e6c173aa9bd7e80a5 /hello_obj2.lc | |
parent | 1595a9ea3ca1080ebf7d060ea28aecf19df8f968 (diff) |
Render curve points as line strips rather than points.
Diffstat (limited to 'hello_obj2.lc')
-rw-r--r-- | hello_obj2.lc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hello_obj2.lc b/hello_obj2.lc index 7b3d4a2..b68a04d 100644 --- a/hello_obj2.lc +++ b/hello_obj2.lc | |||
@@ -19,7 +19,7 @@ makeFrame (cubemap :: TextureCube) | |||
19 | (texture :: Texture) | 19 | (texture :: Texture) |
20 | (prims :: PrimitiveStream Triangle (Vec 4 Float, Vec 3 Float, Vec 3 Float)) | 20 | (prims :: PrimitiveStream Triangle (Vec 4 Float, Vec 3 Float, Vec 3 Float)) |
21 | (plane :: PrimitiveStream Triangle ((Vec 4 Float))) | 21 | (plane :: PrimitiveStream Triangle ((Vec 4 Float))) |
22 | (points :: PrimitiveStream Point (Vec 3 Float, Vec 3 Float)) | 22 | (points :: PrimitiveStream Line (Vec 3 Float, Vec 3 Float)) |
23 | (plane_mat :: Mat 4 4 Float) | 23 | (plane_mat :: Mat 4 4 Float) |
24 | 24 | ||
25 | = imageFrame (emptyDepthImage 1, emptyColorImage (V4 0 0 0.4 1)) | 25 | = imageFrame (emptyDepthImage 1, emptyColorImage (V4 0 0 0.4 1)) |
@@ -59,12 +59,12 @@ makeFrame (cubemap :: TextureCube) | |||
59 | 59 | ||
60 | renderPoints :: | 60 | renderPoints :: |
61 | Mat 4 4 Float | 61 | Mat 4 4 Float |
62 | -> PrimitiveStream Point (Vec 4 Float, Vec 4 Float) | 62 | -> PrimitiveStream Line (Vec 4 Float, Vec 4 Float) |
63 | -> ( (FragmentOperation Depth, FragmentOperation (Color (VecScalar 4 Float))) | 63 | -> ( (FragmentOperation Depth, FragmentOperation (Color (VecScalar 4 Float))) |
64 | , FragmentStream 1 ((Vec 4 Float)) ) | 64 | , FragmentStream 1 ((Vec 4 Float)) ) |
65 | renderPoints cam points = | 65 | renderPoints cam points = |
66 | points | 66 | points |
67 | & rasterizePrimitives (PointCtx (PointSize 5.0) 1.0 LowerLeft) ((Flat)) | 67 | & rasterizePrimitives (LineCtx 1.0 LastVertex) ((Flat)) |
68 | & mapFragments (\((c)) -> ((c))) | 68 | & mapFragments (\((c)) -> ((c))) |
69 | & accumulateWith (DepthOp Less True, ColorOp NoBlending (V4 True True True True)) | 69 | & accumulateWith (DepthOp Less True, ColorOp NoBlending (V4 True True True True)) |
70 | 70 | ||