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 = do
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
,WindowResizable -- and resizable
,WindowInputFocus -- focused (=> active)
,WindowMouseFocus -- Mouse into it
--,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
,WindowResizable -- and resizable
,WindowInputFocus -- focused (=> active)
,WindowMouseFocus -- Mouse into it
--,WindowInputGrabbed-- never let go of input (KB/Mouse)
] $ \window -> do-}
mainGlContext <- SDL.glCreateContext window -- withOpenGL window $ do
] $ \window -> do
--mainGlContext <- SDL.glCreateContext window
withOpenGL window $ do
--TTF.withInit $ do
(Size fbWidth fbHeight) <- glGetDrawableSize window
@ -135,7 +136,7 @@ main = do
, _windowObject = window
, _zDistClosest = zDistClosest
, _zDistFarthest = zDistFarthest
, _renderer = renderer
--, _renderer = renderer
--, envFont = font
}
state = State
@ -187,9 +188,9 @@ main = do
putStrLn "init done."
void $ evalRWST (adjustWindow >> run) env state
SDL.glDeleteContext mainGlContext
SDL.destroyRenderer renderer
destroyWindow window
--SDL.glDeleteContext mainGlContext
--SDL.destroyRenderer renderer
--destroyWindow window
-- Render-Pipeline

View File

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