Refactor, remove dependency of Loop on Preload

This commit is contained in:
2021-03-24 16:29:48 +01:00
parent 3cce959d00
commit f45ca2dd24
3 changed files with 68 additions and 86 deletions
+6 -2
View File
@@ -38,13 +38,17 @@ main :: IO ()
main = do
(sizex,sizey) <- loadConfig
setupLoop
"windowName"
sizex sizey
(sizex,sizey)
(doPreload >>= resizeSpareFBO sizex sizey)
cleanUpPreload
(fmap (setWindowSize sizex sizey) firstWorld)
( \preData w -> do
startTicks <- SDL.ticks
errs <- errors
if length errs > 0
then putStrLn $ "GLerror during doLoop: " ++ (unwords $ map show errs)
else return ()
clear [ColorBuffer,DepthBuffer]
(lightTicks,timeSpentPoking) <- renderPicture' (_renderData preData)
(_cameraRot w) (_cameraZoom w)
(_cameraPos w)