Creates a new [[SpriteBatch]] object.
{{newobjectnotice}}
== Function ==
=== Synopsis ===
<source lang="lua">
spriteBatch = love.graphics.newSpriteBatch( image, maxsprites )
</source>
=== Arguments ===
{{param|Image|image|The Image to use for the sprites.}}
{{param|number|maxsprites (1000)|The maximum number of sprites that the SpriteBatch can contain at any given time. Since version [[11.0]], additional sprites added past this number will automatically grow the spritebatch.}}
=== Returns ===
{{param|SpriteBatch|spriteBatch|The new SpriteBatch.}}

== Function ==
{{newin|[[0.8.0]]|080|type=variant}}
=== Synopsis ===
<source lang="lua">
spriteBatch = love.graphics.newSpriteBatch( image, maxsprites, usage )
</source>
=== Arguments ===
{{param|Image|image|The Image to use for the sprites.}}
{{param|number|maxsprites (1000)|The maximum number of sprites that the SpriteBatch can contain at any given time. Since version [[11.0]], additional sprites added past this number will automatically grow the spritebatch.}}
{{param|SpriteBatchUsage|usage ("dynamic")|The expected usage of the SpriteBatch. The specified usage mode affects the SpriteBatch's memory usage and performance.}}

=== Returns ===
{{param|SpriteBatch|spriteBatch|The new SpriteBatch.}}

== Function ==
{{newin|[[0.9.1]]|091|type=variant}}
=== Synopsis ===
<source lang="lua">
spriteBatch = love.graphics.newSpriteBatch( texture, maxsprites, usage )
</source>
=== Arguments ===
{{param|Texture|texture|The [[Image]] or [[Canvas]] to use for the sprites.}}
{{param|number|maxsprites (1000)|The maximum number of sprites that the SpriteBatch can contain at any given time. Since version [[11.0]], additional sprites added past this number will automatically grow the spritebatch.}}
{{param|SpriteBatchUsage|usage ("dynamic")|The expected usage of the SpriteBatch. The specified usage mode affects the SpriteBatch's memory usage and performance.}}
=== Returns ===
{{param|SpriteBatch|spriteBatch|The new SpriteBatch.}}

== See Also ==
* [[parent::love.graphics]]
* [[Constructs::SpriteBatch]]
[[Category:Functions]]
{{#set:Description=Creates a new [[SpriteBatch]].}}
{{#set:Since=000}}
{{#set:Sub-Category=Object Creation}}
== Other Languages ==
{{i18n|love.graphics.newSpriteBatch}}