Binds the SpriteBatch to memory for more efficient updating.
Binding a SpriteBatch before updating its content can improve the performance as it doesn't push each update to the graphics card separately. Don't forget to unbind the SpriteBatch or the updates won't show up.
function update_spritebatch(spritebatch) spritebatch:bind() for i = 1, 100 do add_tile(spritebatch) end spritebatch:unbind() end
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.