mirror of
https://github.com/photonstorm/phaser
synced 2025-02-25 20:07:08 +00:00
Fixed issue on particle emitter rendering not writing directly to the vertex count property
This commit is contained in:
parent
89c9da54ac
commit
eceb43584b
1 changed files with 6 additions and 13 deletions
|
@ -401,7 +401,6 @@ var TextureTintPipeline = new Class({
|
||||||
var vertexCapacity = this.vertexCapacity;
|
var vertexCapacity = this.vertexCapacity;
|
||||||
var texture = emitterManager.defaultFrame.source.glTexture;
|
var texture = emitterManager.defaultFrame.source.glTexture;
|
||||||
var pca, pcb, pcc, pcd, pce, pcf;
|
var pca, pcb, pcc, pcd, pce, pcf;
|
||||||
var vertexCount = this.vertexCount;
|
|
||||||
|
|
||||||
if (parentMatrix)
|
if (parentMatrix)
|
||||||
{
|
{
|
||||||
|
@ -446,12 +445,10 @@ var TextureTintPipeline = new Class({
|
||||||
|
|
||||||
renderer.setBlendMode(emitter.blendMode);
|
renderer.setBlendMode(emitter.blendMode);
|
||||||
|
|
||||||
if (vertexCount >= vertexCapacity)
|
if (this.vertexCount >= vertexCapacity)
|
||||||
{
|
{
|
||||||
this.vertexCount = vertexCount;
|
|
||||||
this.flush();
|
this.flush();
|
||||||
this.setTexture2D(texture, 0);
|
this.setTexture2D(texture, 0);
|
||||||
vertexCount = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var batchIndex = 0; batchIndex < batchCount; ++batchIndex)
|
for (var batchIndex = 0; batchIndex < batchCount; ++batchIndex)
|
||||||
|
@ -496,7 +493,7 @@ var TextureTintPipeline = new Class({
|
||||||
var ty2 = xw * mvb + yh * mvd + mvf;
|
var ty2 = xw * mvb + yh * mvd + mvf;
|
||||||
var tx3 = xw * mva + y * mvc + mve;
|
var tx3 = xw * mva + y * mvc + mve;
|
||||||
var ty3 = xw * mvb + y * mvd + mvf;
|
var ty3 = xw * mvb + y * mvd + mvf;
|
||||||
var vertexOffset = vertexCount * vertexComponentCount;
|
var vertexOffset = this.vertexCount * vertexComponentCount;
|
||||||
|
|
||||||
if (roundPixels)
|
if (roundPixels)
|
||||||
{
|
{
|
||||||
|
@ -541,13 +538,12 @@ var TextureTintPipeline = new Class({
|
||||||
vertexViewF32[vertexOffset + 28] = uvs.y3;
|
vertexViewF32[vertexOffset + 28] = uvs.y3;
|
||||||
vertexViewU32[vertexOffset + 29] = color;
|
vertexViewU32[vertexOffset + 29] = color;
|
||||||
|
|
||||||
vertexCount += 6;
|
this.vertexCount += 6;
|
||||||
|
|
||||||
if (vertexCount >= vertexCapacity)
|
if (this.vertexCount >= vertexCapacity)
|
||||||
{
|
{
|
||||||
this.vertexCount = vertexCount;
|
|
||||||
this.flush();
|
this.flush();
|
||||||
vertexCount = 0;
|
this.setTexture2D(texture, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -555,17 +551,14 @@ var TextureTintPipeline = new Class({
|
||||||
particleOffset += batchSize;
|
particleOffset += batchSize;
|
||||||
aliveLength -= batchSize;
|
aliveLength -= batchSize;
|
||||||
|
|
||||||
if (vertexCount >= vertexCapacity)
|
if (this.vertexCount >= vertexCapacity)
|
||||||
{
|
{
|
||||||
this.vertexCount = vertexCount;
|
|
||||||
this.flush();
|
this.flush();
|
||||||
this.setTexture2D(texture, 0);
|
this.setTexture2D(texture, 0);
|
||||||
vertexCount = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.vertexCount = vertexCount;
|
|
||||||
this.setTexture2D(texture, 0);
|
this.setTexture2D(texture, 0);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue