diff options
Diffstat (limited to 'examples/Hello.hs')
-rw-r--r-- | examples/Hello.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/Hello.hs b/examples/Hello.hs index 3cc8c63..1cba1b5 100644 --- a/examples/Hello.hs +++ b/examples/Hello.hs | |||
@@ -17,7 +17,7 @@ main = do | |||
17 | Left err -> fail $ "compile error:\n" ++ err | 17 | Left err -> fail $ "compile error:\n" ++ err |
18 | Right pd -> return pd | 18 | Right pd -> return pd |
19 | 19 | ||
20 | win <- initWindow "LambdaCube 3D DSL Hello World" 640 480 | 20 | win <- initWindow "LambdaCube 3D DSL Hello World" 640 640 |
21 | 21 | ||
22 | -- setup render data | 22 | -- setup render data |
23 | let inputSchema = makeSchema $ do | 23 | let inputSchema = makeSchema $ do |
@@ -35,7 +35,7 @@ main = do | |||
35 | LambdaCubeGL.uploadMeshToGPU triangleB >>= LambdaCubeGL.addMeshToObjectArray storage "objects" [] | 35 | LambdaCubeGL.uploadMeshToGPU triangleB >>= LambdaCubeGL.addMeshToObjectArray storage "objects" [] |
36 | 36 | ||
37 | -- load image and upload texture | 37 | -- load image and upload texture |
38 | Right img <- Juicy.readImage "Panels_Diffuse.png" | 38 | Right img <- Juicy.readImage "logo.png" |
39 | textureData <- LambdaCubeGL.uploadTexture2DToGPU img | 39 | textureData <- LambdaCubeGL.uploadTexture2DToGPU img |
40 | 40 | ||
41 | -- allocate GL pipeline | 41 | -- allocate GL pipeline |
@@ -70,7 +70,7 @@ triangleA :: LambdaCubeGL.Mesh | |||
70 | triangleA = Mesh | 70 | triangleA = Mesh |
71 | { mAttributes = Map.fromList | 71 | { mAttributes = Map.fromList |
72 | [ ("position", A_V2F $ SV.fromList [V2 1 1, V2 1 (-1), V2 (-1) (-1)]) | 72 | [ ("position", A_V2F $ SV.fromList [V2 1 1, V2 1 (-1), V2 (-1) (-1)]) |
73 | , ("uv", A_V2F $ SV.fromList [V2 0 0, V2 0 1, V2 1 1]) | 73 | , ("uv", A_V2F $ SV.fromList [V2 1 1, V2 0 1, V2 0 0]) |
74 | ] | 74 | ] |
75 | , mPrimitive = P_Triangles | 75 | , mPrimitive = P_Triangles |
76 | , mGPUData = Nothing | 76 | , mGPUData = Nothing |
@@ -80,7 +80,7 @@ triangleB :: LambdaCubeGL.Mesh | |||
80 | triangleB = Mesh | 80 | triangleB = Mesh |
81 | { mAttributes = Map.fromList | 81 | { mAttributes = Map.fromList |
82 | [ ("position", A_V2F $ SV.fromList [V2 1 1, V2 (-1) (-1), V2 (-1) 1]) | 82 | [ ("position", A_V2F $ SV.fromList [V2 1 1, V2 (-1) (-1), V2 (-1) 1]) |
83 | , ("uv", A_V2F $ SV.fromList [V2 0 0, V2 1 1, V2 1 0]) | 83 | , ("uv", A_V2F $ SV.fromList [V2 1 1, V2 0 0, V2 1 0]) |
84 | ] | 84 | ] |
85 | , mPrimitive = P_Triangles | 85 | , mPrimitive = P_Triangles |
86 | , mGPUData = Nothing | 86 | , mGPUData = Nothing |