Page 1 of 1

Canvas question and usage

Posted: Fri Mar 20, 2015 4:26 pm
by gianmichele
Hey there,

I'm looking at canvas, and although I understand the general concept from the wiki, I was wondering if anyone can go a bit more in depth on its usage.

Why would you use canvas and in which case? What is the advantage? Any drawback to be aware of? Any particular game scenario?

Thanks,
Gianmichele

Re: Canvas question and usage

Posted: Fri Mar 20, 2015 7:22 pm
by veethree
There are a plenty of uses for canvases. If you want to apply a shader to the whole screen you would have to render the scene to a canvas first. If you have static items on your game you can draw those to a canvas once, then draw the canvas each frame. This would reduce drawing operations per frame and therefore be faster. Can't think of anything else at the moment but i'm sure there are more uses.