[reactive] crayon - a 2D opengl curve renderer, with Reactive
animations
Jules Bean
jules at jellybean.co.uk
Wed Mar 25 17:56:43 EDT 2009
Tom Poliquin wrote:
> Jules, thanks for uploading the code!
You're most welcome.
>
> As a reactive newbie, examples are a gigantic help ..
>
> It works great .. about 40FPS on my
> ATI Technologies Inc RV515GL [FireGL V3350]
> using about 3% of my
> AMD Athlon(tm) 64 X2 Dual Core Processor 6000+
> CPU.
Yes, capped to 40fps by the "25" (25 milliseconds = 1/40 seconds) in
line 115 inside the idle callback.
If you change that to "0" then it will take up more or less 100% of your
CPU and framerates will be much higher. On my machine (nvidia m 8xxx) it
does 1000fps (!) for Pong, 400fps for the charts and 100fps for the flowers.
>
> I had to make a small change to get it to work on my
> system (perhaps I'm down rev somewhere) .. but I
> thought I'd share in case other newbies have the same
> issue ..
>
> crayon.hs:689:57:
> Constructor `WeightedProperties' should have 4 arguments, but has been
> given 1
> crayon.hs:699:8:
> Constructor `WeightedProperties' should have 4 arguments, but has been
> given 1
>
> I just changed the WeightedProperties args in each case to,
> (WeightedProperties (_,p) _ _ _)
> from
> (WeightedProperties ((_, p) : _))
D'OH
That is the correct fix, yes.
I forgot that my HOpenGL bugfix actually changed the API.
Jules
More information about the Reactive
mailing list