TessallationFactor now gets updated correcty

This commit is contained in:
Nicole Dresselhaus 2014-06-17 15:41:17 +02:00
parent 5578bb401a
commit 13b814fa0a
No known key found for this signature in database
GPG Key ID: BC16D887851A1A80

View File

@ -262,13 +262,15 @@ run = do
-- set state with new clock-time -- 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"] --liftIO $ putStrLn $ unwords ["clockFactor:",show (state ^. io.tessClockFactor),"\ttc:", show (tc (state ^. gl.glMap.stateTessellationFactor)),"\tsleep ",show frameTime,"ms"]
if hC then if hC then
modify $ (io.clock .~ mt) do
. (gl.glMap.stateTessellationFactor %~ tc) liftIO $ putStrLn $ unwords ["modifying TessFactor to",show $ tc $ state ^. gl.glMap.stateTessellationFactor]
. (io.tessClockFactor %~ (((+) frameTime).((*) 0.99))) modify $ (io.clock .~ mt)
. (io.tessClockTime .~ mt) . (gl.glMap.stateTessellationFactor %~ tc)
. (io.tessClockFactor %~ (((+) frameTime).((*) 0.99)))
. (io.tessClockTime .~ mt)
else else
modify $ (io.clock .~ mt) modify $ (io.clock .~ mt)
. (io.tessClockFactor %~ (((+) frameTime).((*) 0.99)))
-- liftIO $ putStrLn $ concat $ ["TessFactor at: ",show (state ^. gl.glMap.stateTessellationFactor), " - slept for ",show sleepAmount, "μs."] -- liftIO $ putStrLn $ concat $ ["TessFactor at: ",show (state ^. gl.glMap.stateTessellationFactor), " - slept for ",show sleepAmount, "μs."]
shouldClose' <- return $ state ^. window.shouldClose shouldClose' <- return $ state ^. window.shouldClose
unless shouldClose' run unless shouldClose' run