summaryrefslogtreecommitdiff
path: root/MeshSketch.hs
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2019-04-29 20:13:49 -0400
committerJoe Crayne <joe@jerkface.net>2019-04-29 20:13:49 -0400
commit4c98ccde118f4dd0503226154876001bfc2770f7 (patch)
tree3c60abb186c78b42ae1f992e01bfa728899b2fe4 /MeshSketch.hs
parentccb333bf33588dc578380b60c40b8bc963b84f42 (diff)
MeshSketch.new now returns a widget.
Diffstat (limited to 'MeshSketch.hs')
-rw-r--r--MeshSketch.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/MeshSketch.hs b/MeshSketch.hs
index c56d34f..9c6c457 100644
--- a/MeshSketch.hs
+++ b/MeshSketch.hs
@@ -111,7 +111,7 @@ data Realized = Realized
111 , stState :: State 111 , stState :: State
112 } 112 }
113 113
114new :: IO MeshSketch 114new :: IO GLArea
115new = do 115new = do
116 m <- do 116 m <- do
117 objName <- head . (++ ["cube.obj"]) <$> getArgs 117 objName <- head . (++ ["cube.obj"]) <$> getArgs
@@ -143,7 +143,7 @@ new = do
143 _ <- on g #realize $ withCurrentGL g (onRealize obj (dynamicPipeline pipeline) (dynamicSchema pipeline) mm) 143 _ <- on g #realize $ withCurrentGL g (onRealize obj (dynamicPipeline pipeline) (dynamicSchema pipeline) mm)
144 _ <- on g #unrealize $ onUnrealize mm 144 _ <- on g #unrealize $ onUnrealize mm
145 -- _ <- on g #createContext $ nullableContext (glCreateContext w st) 145 -- _ <- on g #createContext $ nullableContext (glCreateContext w st)
146 return mm 146 return g
147 147
148onUnrealize :: MeshSketch -> IO () 148onUnrealize :: MeshSketch -> IO ()
149onUnrealize mm = do 149onUnrealize mm = do