From 39341bf0f9593d0930db6b96cbe4941e304373be Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Fri, 4 Apr 2014 11:18:42 +0200 Subject: [PATCH] removed non-working renderer again. --- src/Main.hs | 19 ++++++++++--------- src/Types.hs | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 946efb5..fee5917 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -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 diff --git a/src/Types.hs b/src/Types.hs index 10afc00..c48351d 100644 --- a/src/Types.hs +++ b/src/Types.hs @@ -20,7 +20,7 @@ data Env = Env , _zDistFarthest :: !Double --, envGLContext :: !GLContext --, envFont :: TTF.TTFFont - , _renderer :: !Renderer +-- , _renderer :: !Renderer } --Mutable State