mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 14:38:30 +00:00
Tidying up
This commit is contained in:
parent
f13043ee63
commit
4f1bd5a3eb
1 changed files with 3 additions and 0 deletions
|
@ -132,11 +132,13 @@ var ParticleRenderer = new Class({
|
|||
}
|
||||
|
||||
this.bind(shader);
|
||||
|
||||
this.vertexBufferObject.updateResource(vertexDataBuffer.getUsedBufferAsFloat(), 0);
|
||||
|
||||
gl.drawElements(gl.TRIANGLES, this.elementCount, gl.UNSIGNED_SHORT, 0);
|
||||
|
||||
this.elementCount = 0;
|
||||
|
||||
vertexDataBuffer.clear();
|
||||
|
||||
if (renderTarget)
|
||||
|
@ -213,6 +215,7 @@ var ParticleRenderer = new Class({
|
|||
|
||||
this.manager.setRenderer(this, emitter.frame.source.glTexture, renderTarget);
|
||||
|
||||
// If there are more particles than fit into a single batch (16000) then it flushes after each one
|
||||
for (var batchIndex = 0; batchIndex < batchCount; ++batchIndex)
|
||||
{
|
||||
var batchSize = Math.min(length, CONST.MAX);
|
||||
|
|
Loading…
Add table
Reference in a new issue