diff options
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 |