removed non-working renderer again.

This commit is contained in:
Nicole Dresselhaus 2014-04-04 11:18:42 +02:00
parent ba84ede01d
commit 39341bf0f9
2 changed files with 11 additions and 10 deletions

View File

@ -69,21 +69,22 @@ import qualified Debug.Trace as D (trace)
main :: IO () main :: IO ()
main = do main = do
SDL.withInit [InitVideo, InitAudio, InitEvents, InitTimer] $ do --also: InitNoParachute -> faster, without parachute! SDL.withInit [InitVideo, InitAudio, InitEvents, InitTimer] $ do --also: InitNoParachute -> faster, without parachute!
(window, renderer) <- SDL.createWindowAndRenderer (Size 1024 600) [WindowOpengl -- we want openGL {- (window, renderer) <- SDL.createWindowAndRenderer (Size 1024 600) [WindowOpengl -- we want openGL
,WindowShown -- window should be visible ,WindowShown -- window should be visible
,WindowResizable -- and resizable ,WindowResizable -- and resizable
,WindowInputFocus -- focused (=> active) ,WindowInputFocus -- focused (=> active)
,WindowMouseFocus -- Mouse into it ,WindowMouseFocus -- Mouse into it
--,WindowInputGrabbed-- never let go of input (KB/Mouse) --,WindowInputGrabbed-- never let go of input (KB/Mouse)
] ] -}
{- SDL.withWindow "Pioneers" (SDL.Position 100 100) (Size 1024 600) [WindowOpengl -- we want openGL SDL.withWindow "Pioneers" (SDL.Position 100 100) (Size 1024 600) [WindowOpengl -- we want openGL
,WindowShown -- window should be visible ,WindowShown -- window should be visible
,WindowResizable -- and resizable ,WindowResizable -- and resizable
,WindowInputFocus -- focused (=> active) ,WindowInputFocus -- focused (=> active)
,WindowMouseFocus -- Mouse into it ,WindowMouseFocus -- Mouse into it
--,WindowInputGrabbed-- never let go of input (KB/Mouse) --,WindowInputGrabbed-- never let go of input (KB/Mouse)
] $ \window -> do-} ] $ \window -> do
mainGlContext <- SDL.glCreateContext window -- withOpenGL window $ do --mainGlContext <- SDL.glCreateContext window
withOpenGL window $ do
--TTF.withInit $ do --TTF.withInit $ do
(Size fbWidth fbHeight) <- glGetDrawableSize window (Size fbWidth fbHeight) <- glGetDrawableSize window
@ -135,7 +136,7 @@ main = do
, _windowObject = window , _windowObject = window
, _zDistClosest = zDistClosest , _zDistClosest = zDistClosest
, _zDistFarthest = zDistFarthest , _zDistFarthest = zDistFarthest
, _renderer = renderer --, _renderer = renderer
--, envFont = font --, envFont = font
} }
state = State state = State
@ -187,9 +188,9 @@ main = do
putStrLn "init done." putStrLn "init done."
void $ evalRWST (adjustWindow >> run) env state void $ evalRWST (adjustWindow >> run) env state
SDL.glDeleteContext mainGlContext --SDL.glDeleteContext mainGlContext
SDL.destroyRenderer renderer --SDL.destroyRenderer renderer
destroyWindow window --destroyWindow window
-- Render-Pipeline -- Render-Pipeline

View File

@ -20,7 +20,7 @@ data Env = Env
, _zDistFarthest :: !Double , _zDistFarthest :: !Double
--, envGLContext :: !GLContext --, envGLContext :: !GLContext
--, envFont :: TTF.TTFFont --, envFont :: TTF.TTFFont
, _renderer :: !Renderer -- , _renderer :: !Renderer
} }
--Mutable State --Mutable State