summaryrefslogtreecommitdiff
path: root/GLWidget.hs
diff options
context:
space:
mode:
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