{{newin (日本語)|[[0.9.2 (日本語)|0.9.2]]|092|type=関数}}
Immediately sends all new and modified sprite data in the batch to the graphics card.

Normally it isn't necessary to call this method as love.graphics.draw(spritebatch, ...) will do it automatically if needed, but explicitly using [[SpriteBatch:flush]] gives more control over when the work happens.

If this method is used, it generally shouldn't be called more than once (at most) between love.graphics.draw(spritebatch, ...) calls.

== 関数 ==
=== 概要 ===
<source lang="lua">
SpriteBatch:flush( )
</source>
=== 引数 ===
なし。
=== 返値 ===
ありません。
== 用例 ==
=== Initialize a static spritebatch with sprites and immediately send the data to the graphics card ===
<source lang="Lua">
function love.load()
    image = love.graphics.newImage("tile.png")
    spritebatch = love.graphics.newSpriteBatch(image, 20 * 20, "static")

    for y = 1, 20 do
        for x = 1, 20 do
            spritebatch:add((x - 1) * 64, (y - 1) * 64)
        end
    end

    -- If we call SpriteBatch:flush now then it won't be called internally when the SpriteBatch is drawn for the first time.
    -- In other words, we're choosing to do the work in love.load instead of the first love.draw.
    spritebatch:flush()
end

function love.draw()
    love.graphics.draw(spritebatch, 0, 0)
end
</source>

== 関連 ==
* [[parent::SpriteBatch (日本語)]]
[[Category:Functions (日本語)]]
{{#set:Description=Immediately sends all new and modified sprite data to the graphics card.}}
== そのほかの言語 ==
{{i18n (日本語)|SpriteBatch:flush}}