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
|
||||
ad <- get
|
||||
-- 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
|
||||
-- SDL.clear renderer
|
||||
-- compute dt and update elapsedTime
|
||||
|
@ -141,7 +141,7 @@ withAffection AffectionConfig{..} = do
|
|||
}
|
||||
-- poll events
|
||||
evs <- preHandleEvents =<< liftIO SDL.pollEvents
|
||||
MP.mapM_ eventLoop evs
|
||||
mapM_ eventLoop evs
|
||||
-- execute user defined update loop
|
||||
updateLoop dt
|
||||
-- execute user defined draw loop
|
||||
|
@ -149,12 +149,11 @@ withAffection AffectionConfig{..} = do
|
|||
-- handle all new draw requests
|
||||
ad2 <- get
|
||||
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
|
||||
put $ ad2
|
||||
{ drawStack = clear }
|
||||
-- actual drawing
|
||||
-- SDL.copy (windowRenderer ad2) texture Nothing Nothing
|
||||
SDL.present (windowRenderer ad2)
|
||||
-- save new time
|
||||
liftIO $ writeIORef execTime now
|
||||
|
|
Loading…
Reference in a new issue