clear batches at beginning of draw
This commit is contained in:
parent
b53cad3147
commit
00780ad113
|
@ -61,6 +61,10 @@ func gameloop(win *pixelgl.Window, tilemap *tmx.Map) {
|
|||
win.Clear(clearColor)
|
||||
|
||||
// Draw tiles
|
||||
for _, batch := range batches {
|
||||
batch.Clear()
|
||||
}
|
||||
|
||||
for _, layer := range tilemap.Layers {
|
||||
for tileIndex, tile := range layer.DecodedTiles {
|
||||
ts := layer.Tileset
|
||||
|
|
Loading…
Reference in New Issue