diff options
author | Joe Crayne <joe@jerkface.net> | 2019-05-21 04:21:48 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2019-05-21 04:21:48 -0400 |
commit | a2aa65ffc5a4fc6cd0f41ccab1516f85a27989b2 (patch) | |
tree | 3b02233126690fea8a96ad2d2765be858ec41ab4 /GLWidget.hs | |
parent | bc6fd1c71e22ef54a4aed8774dcec4dd190b9dbc (diff) |
Added colors to pen points + various updates.
Diffstat (limited to 'GLWidget.hs')
-rw-r--r-- | GLWidget.hs | 7 |
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 | |||
63 | withCurrentGL :: GLArea -> IO () -> IO () | 63 | withCurrentGL :: GLArea -> IO () -> IO () |
64 | withCurrentGL glarea action = do | 64 | withCurrentGL 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 | ||
69 | nullableContext :: IO (Maybe GLContext) -> IO GLContext | 72 | nullableContext :: IO (Maybe GLContext) -> IO GLContext |
70 | nullableContext mk = mk >>= maybe mknull return | 73 | nullableContext mk = mk >>= maybe mknull return |