From 13b814fa0a3288bb2eb1d7f08d8841ba4bcedc4b Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Tue, 17 Jun 2014 15:41:17 +0200 Subject: [PATCH] TessallationFactor now gets updated correcty --- src/Main.hs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index bab7d61..14bdb5e 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -262,13 +262,15 @@ run = do -- set state with new clock-time --liftIO $ putStrLn $ unwords ["clockFactor:",show (state ^. io.tessClockFactor),"\ttc:", show (tc (state ^. gl.glMap.stateTessellationFactor)),"\tsleep ",show frameTime,"ms"] if hC then - modify $ (io.clock .~ mt) - . (gl.glMap.stateTessellationFactor %~ tc) - . (io.tessClockFactor %~ (((+) frameTime).((*) 0.99))) - . (io.tessClockTime .~ mt) + do + liftIO $ putStrLn $ unwords ["modifying TessFactor to",show $ tc $ state ^. gl.glMap.stateTessellationFactor] + modify $ (io.clock .~ mt) + . (gl.glMap.stateTessellationFactor %~ tc) + . (io.tessClockFactor %~ (((+) frameTime).((*) 0.99))) + . (io.tessClockTime .~ mt) else modify $ (io.clock .~ mt) - + . (io.tessClockFactor %~ (((+) frameTime).((*) 0.99))) -- liftIO $ putStrLn $ concat $ ["TessFactor at: ",show (state ^. gl.glMap.stateTessellationFactor), " - slept for ",show sleepAmount, "μs."] shouldClose' <- return $ state ^. window.shouldClose unless shouldClose' run