make red channel cycle

This commit is contained in:
nek0 2020-05-17 17:30:05 +02:00
parent b5b59bea7d
commit f5ae496256

View file

@ -191,6 +191,15 @@ main = do
err <- get GL.errors
when (not $ null err) (print $ "loop errors: " <> show err)
-- update MVAr values
putMVar red newRed
-- cycle the increment for red if neccessary
if (newRed + incrementValue > 1 || newRed + incrementValue < 0)
then
putMVar increment (-incrementValue)
else
putMVar increment incrementValue
-- make GL finish things up
-- GL.flush
-- draw context on screen