summaryrefslogtreecommitdiff
path: root/GLWidget.hs
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2019-05-21 04:21:48 -0400
committerJoe Crayne <joe@jerkface.net>2019-05-21 04:21:48 -0400
commita2aa65ffc5a4fc6cd0f41ccab1516f85a27989b2 (patch)
tree3b02233126690fea8a96ad2d2765be858ec41ab4 /GLWidget.hs
parentbc6fd1c71e22ef54a4aed8774dcec4dd190b9dbc (diff)
Added colors to pen points + various updates.
Diffstat (limited to 'GLWidget.hs')
-rw-r--r--GLWidget.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/GLWidget.hs b/GLWidget.hs
index 8620c1a..ebd6694 100644
--- a/GLWidget.hs
+++ b/GLWidget.hs
@@ -63,8 +63,11 @@ newGLWidget mk w = do
63withCurrentGL :: GLArea -> IO () -> IO () 63withCurrentGL :: GLArea -> IO () -> IO ()
64withCurrentGL glarea action = do 64withCurrentGL glarea action = do
65 gLAreaMakeCurrent glarea 65 gLAreaMakeCurrent glarea
66 e <- gLAreaGetError glarea 66 gLAreaGetError glarea >>= maybe action oopsG
67 maybe action oopsG e 67 -- -- The following causes realize and resize to each be triggered
68 -- -- twice before the first render signal.
69 -- gLAreaAttachBuffers glarea
70 -- gLAreaGetError glarea >>= maybe action oopsG
68 71
69nullableContext :: IO (Maybe GLContext) -> IO GLContext 72nullableContext :: IO (Maybe GLContext) -> IO GLContext
70nullableContext mk = mk >>= maybe mknull return 73nullableContext mk = mk >>= maybe mknull return