From 4eb31b1bf5a7f5058c01541bbe74f166dce1bb84 Mon Sep 17 00:00:00 2001 From: nek0 Date: Fri, 16 Oct 2020 06:06:39 +0200 Subject: [PATCH] move gl call after context creation --- extern/affection/src/Affection.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extern/affection/src/Affection.hs b/extern/affection/src/Affection.hs index e3de186..6d48afc 100644 --- a/extern/affection/src/Affection.hs +++ b/extern/affection/src/Affection.hs @@ -57,8 +57,6 @@ withAffection AffectionConfig{..} = do SDL.initialize is -- give SDL render quality SDL.HintRenderScaleQuality SDL.$= SDL.ScaleLinear - -- sync updates with monitor - SDL.swapInterval $= SDL.SynchronizedUpdates -- just checking… do renderQuality <- SDL.get SDL.HintRenderScaleQuality @@ -77,6 +75,7 @@ withAffection AffectionConfig{..} = do contexts <- zip (map (\(x,_,_) -> x) windows) <$> mapM (SDL.glCreateContext . (\(_,y,_) -> y)) windows mapM_ (\w -> flip SDL.setWindowMode ((\(_,_,z) -> z) w) ((\(_,y,_) -> y) w)) windows + -- sync updates with monitor -- SDL.swapInterval $= SDL.SynchronizedUpdates -- <- causes Problems with windows liftIO $ logIO Debug "Getting Time" -- print current used GL Version