Creates a new SpriteBatch object.
This function can be slow if it is called repeatedly, such as from love.update or love.draw. If you need to use a specific resource often, create it once and store it somewhere it can be reused!
spriteBatch = love.graphics.newSpriteBatch( image, maxsprites )
Image image
number maxsprites (1000)
SpriteBatch spriteBatch
Available since LÖVE 0.8.0
This variant is not supported in earlier versions.
spriteBatch = love.graphics.newSpriteBatch( image, maxsprites, usage )
Image image
number maxsprites (1000)
SpriteBatchUsage usage ("dynamic")
SpriteBatch spriteBatch
Available since LÖVE 0.9.1
This variant is not supported in earlier versions.
spriteBatch = love.graphics.newSpriteBatch( texture, maxsprites, usage )
Texture texture
number maxsprites (1000)
SpriteBatchUsage usage ("dynamic")
SpriteBatch spriteBatch
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.graphics.newSpriteBatch