[Haskell-beginners] Re: Haskell and OpenGL

Maciej Piechotka uzytkownik2 at gmail.com
Thu Feb 25 18:01:40 EST 2010

On Thu, 2010-02-25 at 12:59 -0800, Tyler Hayes wrote:
> For anyone comfortable with OpenGl in Haskell,
> what is the equivalent for glutTimerFunc?
> Is it addTimerCallback?  If so, how does it work--I've tried it and I
> can't seem to get it to work...

According to source it calls glutTimerFunc with timeout, the callback
and 0.

Such code seems to works for me:

> import Graphics.UI.GLUT
> main = do getArgsAndInitialize
>           _ <- createWindow "Test"
>           addTimerCallback 1000 (putStrLn "Callback")
>           mainLoop

What do you mean 'to get it to work'?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/beginners/attachments/20100225/3939fb9d/attachment-0001.bin

More information about the Beginners mailing list