diff options
author | Csaba Hruska <csaba.hruska@gmail.com> | 2016-02-04 14:34:47 +0100 |
---|---|---|
committer | Csaba Hruska <csaba.hruska@gmail.com> | 2016-02-04 14:34:47 +0100 |
commit | 580d3fb560f31e22d3040fe80642fbaea1e3a4d4 (patch) | |
tree | 8252fe57e7fd4f0b4b7a3b1f29b7ade479f52abc /examples/Hello.hs | |
parent | c2bc1b9b4b9d04550178b80de381ed33b7f0f7c9 (diff) |
add cabal file for examples
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 | ||