diff --git a/src/Affection.hs b/src/Affection.hs index 37cd4bd..3bbf0d9 100644 --- a/src/Affection.hs +++ b/src/Affection.hs @@ -10,6 +10,8 @@ module Affection import SDL (($=)) import qualified SDL +import qualified SDL.Raw.Video as SDL (glSetAttribute) +import qualified SDL.Raw.Enum as SDL import System.Clock @@ -83,6 +85,7 @@ withAffection AffectionConfig{..} = do -- SDL.windowInitialSize windowConfig -- ) -- SDL.rendererRenderTarget renderer $= Just texture + _ <- SDL.glSetAttribute SDL.SDL_GL_SHARE_WITH_CURRENT_CONTEXT 1 context <- SDL.glCreateContext window let SDL.V2 (CInt rw) (CInt rh) = SDL.windowInitialSize windowConfig (w, h) = case canvasSize of