Fixed issue with vertex buffer creation on Static Tilemap Layer

This commit is contained in:
Felipe Alfonso 2018-02-22 01:07:43 -03:00
parent 11d77de4ab
commit a218cd5f4a
2 changed files with 2 additions and 5 deletions

View file

@ -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;
}

View file

@ -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
{