this is a question about rendering loop
adicirstei opened this issue · 3 comments
any idea why if I remove the print on line 57 the window do not paint anymore an the processor fan sounds like it is about to melt?
I am using v1.2.0-SNAPSHOT but it.s the same outcome with v1.1.0
full source:
https://gist.github.com/adicirstei/8ca0297eb1f51359996be204696f0201
Regards.
A
Well... I don't know why window does not paint. But your loop runs as fast as possible and surely eats all core power. print slows loop down.
Just use :draw-fn in such case. It has controlled FPS (60 by default) and is properly synchronized with display.
it isn't that. :(
the expression that makes the trick is (count pts), which was by chance under the print. My only thought is that map-indexed returns a lazy seq and count forces evaluation.
I guess, welcome to to clojure weird world. :)
I guess this has nothing to do with the library. I am closing it.