updating to reality

Preparing to incorporate more of gegl, since it has matured a little
bit.
This commit is contained in:
nek0 2016-10-16 17:01:31 +02:00
parent 2b69376fb7
commit 42cdb7e246
2 changed files with 5 additions and 1 deletions

View file

@ -49,7 +49,7 @@ library
hs-source-dirs: src hs-source-dirs: src
default-language: Haskell2010 default-language: Haskell2010
-- Other library packages from which modules are imported. -- Other library packages from which modules are imported.
build-depends: base >=4.8 && <4.9 build-depends: base >=4.9 && <4.10
, sdl2 , sdl2
, text , text
, linear , linear

View file

@ -23,8 +23,12 @@ withAllAffection ops = do
withWindow :: Monad m => Text -> WindowConfig -> RendererConfig -> RenderT m a -> IO () withWindow :: Monad m => Text -> WindowConfig -> RendererConfig -> RenderT m a -> IO ()
withWindow title wconf rconf ops = do withWindow title wconf rconf ops = do
window <- createWindow title wconf window <- createWindow title wconf
-- I don't need a renderer here, i need a surface
renderer <- createRenderer window (-1) rconf renderer <- createRenderer window (-1) rconf
surface <- getWindowSurface window
gegl_init gegl_init
-- I think I need some AffectionT or someting similar here and not a RenderT
-- from SDL.
inRender renderer $ ops inRender renderer $ ops
gegl_exit gegl_exit
destroyWindow window destroyWindow window