{{newinoldin|[[0.9.0]]|090|[[11.0]]|110|type=function|text=SpriteBatches now automatically grow when necessary}}
Sets the maximum number of sprites the SpriteBatch can hold. Existing sprites in the batch (up to the new maximum) will ''not'' be cleared when this function is called.
{{notice|This function can be slow if it is called every frame, such as from [[love.update]] or [[love.draw]].}}
== Function ==
=== Synopsis ===
<source lang="lua">
SpriteBatch:setBufferSize( size )
</source>
=== Arguments ===
{{param|number|size|The new maximum number of sprites the batch can hold.}}
=== Returns ===
Nothing.
== See Also ==
* [[parent::SpriteBatch]]
* [[SpriteBatch:getBufferSize]]
* [[SpriteBatch:getCount]]
[[Category:Functions]]
{{#set:Description=Sets the maximum number of sprites the SpriteBatch can hold.}}
== Other Languages ==
{{i18n|SpriteBatch:setBufferSize}}