Created
June 2, 2016 09:32
-
-
Save godwhoa/1173f5a374cf324ad1a7be408be4d0af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/TileLayer.lua b/src/TileLayer.lua | |
index ecc40b2..f54836b 100644 | |
--- a/src/TileLayer.lua | |
+++ b/src/TileLayer.lua | |
@@ -223,7 +223,7 @@ function TileLayer:draw(x,y) | |
local tile_iterator = self:_getTileIterator() | |
for _,batch in pairs(self._batches) do | |
- batch:bind() | |
+ batch:flush() | |
batch:clear() | |
end | |
@@ -239,7 +239,7 @@ function TileLayer:draw(x,y) | |
batch = love.graphics.newSpriteBatch(tile.tileset.image,size) | |
self._batches[tileset] = batch | |
- batch:bind() | |
+ batch:flush() | |
end | |
local x2,y2,dx,dy,angle,sx,sy,ox2,oy2 = self:_getDrawParameters(tx,ty,tile) | |
@@ -251,7 +251,7 @@ function TileLayer:draw(x,y) | |
end | |
for tileset,batch in pairs(self._batches) do | |
- if unbind then batch:unbind() end | |
+ if unbind then batch:flush() end | |
love.graphics.draw(batch, x,y, nil,nil,nil, | |
-self.ox-tileset.offsetX, -self.oy-tileset.offsetY) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment