set sharable contexts
This commit is contained in:
parent
2b77d448ac
commit
62921052df
1 changed files with 3 additions and 0 deletions
|
@ -10,6 +10,8 @@ module Affection
|
||||||
|
|
||||||
import SDL (($=))
|
import SDL (($=))
|
||||||
import qualified SDL
|
import qualified SDL
|
||||||
|
import qualified SDL.Raw.Video as SDL (glSetAttribute)
|
||||||
|
import qualified SDL.Raw.Enum as SDL
|
||||||
|
|
||||||
import System.Clock
|
import System.Clock
|
||||||
|
|
||||||
|
@ -83,6 +85,7 @@ withAffection AffectionConfig{..} = do
|
||||||
-- SDL.windowInitialSize windowConfig
|
-- SDL.windowInitialSize windowConfig
|
||||||
-- )
|
-- )
|
||||||
-- SDL.rendererRenderTarget renderer $= Just texture
|
-- SDL.rendererRenderTarget renderer $= Just texture
|
||||||
|
_ <- SDL.glSetAttribute SDL.SDL_GL_SHARE_WITH_CURRENT_CONTEXT 1
|
||||||
context <- SDL.glCreateContext window
|
context <- SDL.glCreateContext window
|
||||||
let SDL.V2 (CInt rw) (CInt rh) = SDL.windowInitialSize windowConfig
|
let SDL.V2 (CInt rw) (CInt rh) = SDL.windowInitialSize windowConfig
|
||||||
(w, h) = case canvasSize of
|
(w, h) = case canvasSize of
|
||||||
|
|
Loading…
Reference in a new issue