summaryrefslogtreecommitdiff
path: root/examples/Hello.hs
diff options
context:
space:
mode:
authorCsaba Hruska <csaba.hruska@gmail.com>2016-02-04 14:34:47 +0100
committerCsaba Hruska <csaba.hruska@gmail.com>2016-02-04 14:34:47 +0100
commit580d3fb560f31e22d3040fe80642fbaea1e3a4d4 (patch)
tree8252fe57e7fd4f0b4b7a3b1f29b7ade479f52abc /examples/Hello.hs
parentc2bc1b9b4b9d04550178b80de381ed33b7f0f7c9 (diff)
add cabal file for examples
Diffstat (limited to 'examples/Hello.hs')
-rw-r--r--examples/Hello.hs8
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
9import Codec.Picture as Juicy 9import Codec.Picture as Juicy
10 10
11import LambdaCube.Compiler.Driver as LambdaCube -- compiler 11import Data.Aeson
12import qualified Data.ByteString as SB
12 13
13main :: IO () 14main :: IO ()
14main = do 15main = 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