diff options
Diffstat (limited to 'examples/Hello.hs')
-rw-r--r-- | examples/Hello.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/Hello.hs b/examples/Hello.hs index 89553d0..081fd93 100644 --- a/examples/Hello.hs +++ b/examples/Hello.hs | |||
@@ -8,14 +8,12 @@ import LambdaCube.GL.Mesh as LambdaCubeGL | |||
8 | 8 | ||
9 | import Codec.Picture as Juicy | 9 | import Codec.Picture as Juicy |
10 | 10 | ||
11 | import LambdaCube.Compiler.Driver as LambdaCube -- compiler | 11 | import Data.Aeson |
12 | import qualified Data.ByteString as SB | ||
12 | 13 | ||
13 | main :: IO () | 14 | main :: IO () |
14 | main = do | 15 | main = do |
15 | -- compile hello.lc to graphics pipeline description | 16 | Just pipelineDesc <- decodeStrict <$> SB.readFile "hello.json" |
16 | pipelineDesc <- LambdaCube.compileMain ["."] OpenGL33 "hello" >>= \case | ||
17 | Left err -> fail $ "compile error:\n" ++ err | ||
18 | Right pd -> return pd | ||
19 | 17 | ||
20 | win <- initWindow "LambdaCube 3D DSL Hello World" 640 640 | 18 | win <- initWindow "LambdaCube 3D DSL Hello World" 640 640 |
21 | 19 | ||