diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index c0355ebfa..eafbc807a 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -347,12 +347,9 @@ var TextureTintPipeline = new Class({ } this.vertexBuffer = tilemap.vertexBuffer; - - renderer.setTexture2D(frame.source.glTexture, 0); renderer.setPipeline(this); - + renderer.setTexture2D(frame.source.glTexture, 0); gl.drawArrays(this.topology, 0, tilemap.vertexCount); - this.vertexBuffer = pipelineVertexBuffer; } diff --git a/src/tilemaps/staticlayer/StaticTilemapLayer.js b/src/tilemaps/staticlayer/StaticTilemapLayer.js index fc0da77ba..e1f43b471 100644 --- a/src/tilemaps/staticlayer/StaticTilemapLayer.js +++ b/src/tilemaps/staticlayer/StaticTilemapLayer.js @@ -329,10 +329,10 @@ var StaticTilemapLayer = new Class({ this.vertexCount = vertexCount; this.dirty = false; - if (vertexBuffer === null) { vertexBuffer = renderer.createVertexBuffer(bufferData, gl.STATIC_DRAW); + this.vertexBuffer = vertexBuffer; } else {