Canvas question and usage

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
gianmichele
Citizen
Posts: 63
Joined: Tue Jan 14, 2014 11:03 pm

Canvas question and usage

Post 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
User avatar
veethree
Inner party member
Posts: 875
Joined: Sat Dec 10, 2011 7:18 pm

Re: Canvas question and usage

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 45 guests