SpriteBatch - What is it good for?

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
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

SpriteBatch - What is it good for?

Post by kikito »

I'm just curious about this LÖVE feature.

What are the uses of SpriteBatch? Is drawing a spritebatch faster than just drawing the equivalent images and quads directly, with love.graphics.draw?
When I write def I mean function.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: SpriteBatch - What is it good for?

Post by rude »

Yes, it should be. Especially if you don't update the SpriteBatch each frame.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: SpriteBatch - What is it good for?

Post by kikito »

I see.

I thought that SpriteBatches got "emptied" once they got drawn. :P

They don't - It makes sense, for example if you want to repeat the same sprite groups again and again, on different positions. Thanks!
When I write def I mean function.
Post Reply

Who is online

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