@@ 36,6 36,9 @@ import Graphics.Layout (boxLayout)
import SDL hiding (rotate)
import Graphics.GL.Core32
+import Data.Function (fix)
+import Control.Monad (unless)
+
import Data.Maybe (fromMaybe)
import System.Environment (getArgs)
@@ 143,12 146,12 @@ main = do
fix $ \loop -> do
events <- fmap eventPayload <$> pollEvents
- liftIO $ glClearColor 0 0 0 1
- liftIO $ glClear GL_COLOR_BUFFER_BIT
+ glClearColor 0 0 0 1
+ glClear GL_COLOR_BUFFER_BIT
- sz@(V2 dw dh) <- liftIO $ glGetDrawableSize w
- liftIO $ glViewport 0 0 (fromIntegral dw) (fromIntegral dh)
+ sz@(V2 dw dh) <- glGetDrawableSize w
+ glViewport 0 0 (fromIntegral dw) (fromIntegral dh)
- liftIO $ glSwapWindow w
+ glSwapWindow w
unless (QuitEvent `elem` events) loop
return ()