~alcinnz/haphaestus

534ee780d2b295ac67fab59f481245b9ed5f5bc2 — Adrian Cochrane 1 year, 1 month ago 53f0662
Typesystem/import fixes.
1 files changed, 8 insertions(+), 5 deletions(-)

M src/Main.hs
M src/Main.hs => src/Main.hs +8 -5
@@ 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 ()