Merge pull request #1227 from knoxHuang/v1.3

fix Tiled Sprite repeat error for fireball/issues/4475
This commit is contained in:
pandamicro
2016-10-21 10:21:12 +08:00
committed by GitHub
+2 -1
View File
@@ -91,7 +91,8 @@ function updateBuffer (numQuads) {
gl.bindBuffer(gl.ARRAY_BUFFER, _vertexBuffer);
gl.bufferData(gl.ARRAY_BUFFER, _vertexDataF32, gl.DYNAMIC_DRAW);
}
_maxVertexSize = numQuads * 4;
// Downsize by 100 to avoid vertex data overflow
_maxVertexSize = (numQuads - 100) * 4;
}
// Inspired from @Heishe's gotta-batch-them-all branch