to parallel and not to parallel
This commit is contained in:
parent
66b8f54a07
commit
121c9fb120
1 changed files with 3 additions and 4 deletions
|
@ -128,7 +128,7 @@ withAffection AffectionConfig{..} = do
|
||||||
-- get state
|
-- get state
|
||||||
ad <- get
|
ad <- get
|
||||||
-- clean draw requests from last run
|
-- clean draw requests from last run
|
||||||
mapM_ (invalidateDrawRequest (drawStride ad) (drawCPP ad)) (drawStack ad)
|
MP.mapM_ (invalidateDrawRequest (drawStride ad) (drawCPP ad)) (drawStack ad)
|
||||||
-- clean the renderer form last time
|
-- clean the renderer form last time
|
||||||
-- SDL.clear renderer
|
-- SDL.clear renderer
|
||||||
-- compute dt and update elapsedTime
|
-- compute dt and update elapsedTime
|
||||||
|
@ -141,7 +141,7 @@ withAffection AffectionConfig{..} = do
|
||||||
}
|
}
|
||||||
-- poll events
|
-- poll events
|
||||||
evs <- preHandleEvents =<< liftIO SDL.pollEvents
|
evs <- preHandleEvents =<< liftIO SDL.pollEvents
|
||||||
MP.mapM_ eventLoop evs
|
mapM_ eventLoop evs
|
||||||
-- execute user defined update loop
|
-- execute user defined update loop
|
||||||
updateLoop dt
|
updateLoop dt
|
||||||
-- execute user defined draw loop
|
-- execute user defined draw loop
|
||||||
|
@ -149,12 +149,11 @@ withAffection AffectionConfig{..} = do
|
||||||
-- handle all new draw requests
|
-- handle all new draw requests
|
||||||
ad2 <- get
|
ad2 <- get
|
||||||
clear <- catMaybes <$>
|
clear <- catMaybes <$>
|
||||||
mapM (handleDrawRequest (drawStride ad) (drawCPP ad)) (drawStack ad2)
|
MP.mapM (handleDrawRequest (drawStride ad) (drawCPP ad)) (drawStack ad2)
|
||||||
-- save all draw requests to clear in next run
|
-- save all draw requests to clear in next run
|
||||||
put $ ad2
|
put $ ad2
|
||||||
{ drawStack = clear }
|
{ drawStack = clear }
|
||||||
-- actual drawing
|
-- actual drawing
|
||||||
-- SDL.copy (windowRenderer ad2) texture Nothing Nothing
|
|
||||||
SDL.present (windowRenderer ad2)
|
SDL.present (windowRenderer ad2)
|
||||||
-- save new time
|
-- save new time
|
||||||
liftIO $ writeIORef execTime now
|
liftIO $ writeIORef execTime now
|
||||||
|
|
Loading…
Reference in a new issue