set sharable contexts

This commit is contained in:
nek0 2018-06-16 19:34:42 +02:00
parent 2b77d448ac
commit 62921052df
1 changed files with 3 additions and 0 deletions

View File

@ -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