- From: Robert O'Callahan <robert@ocallahan.org>
- Date: Sat, 5 Sep 2009 22:54:57 +1200
On Sat, Sep 5, 2009 at 6:39 PM, Marius Gundersen <gundersen at gmail.com>wrote: > I've been playing around with the canvas element, making a 3D engine. It > works, but is incredibly slow. Part of the reason is probably that the > browser renders the canvas everytime I draw something to it. In a 3D engine, > as well as a game engine, the entire canvas is erased and redrawn several > times a second, and only at the end of each frame does it need to be > rendered to the screen. > I assume you have a setTimeout handler (or similar) which renders a complete frame before returning. If so, then in Gecko and I think also in Webkit the canvas will not be drawn to the screen while your script is running, only between frames. So I suspect your performance problem has some other cause. Rob -- "He was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all." [Isaiah 53:5-6] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090905/66ee93ff/attachment-0001.htm>
Received on Saturday, 5 September 2009 03:54:57 UTC