make red channel cycle
This commit is contained in:
parent
b5b59bea7d
commit
f5ae496256
1 changed files with 9 additions and 0 deletions
|
@ -191,6 +191,15 @@ main = do
|
||||||
err <- get GL.errors
|
err <- get GL.errors
|
||||||
when (not $ null err) (print $ "loop errors: " <> show err)
|
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
|
-- make GL finish things up
|
||||||
-- GL.flush
|
-- GL.flush
|
||||||
-- draw context on screen
|
-- draw context on screen
|
||||||
|
|
Loading…
Reference in a new issue