mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 23:20:59 +00:00
The Bitmap Text Game Object WebGL Renderer function has been updated to support multi-texture units.
This commit is contained in:
parent
446389bb4d
commit
50f10b3d4b
1 changed files with 5 additions and 5 deletions
|
@ -30,7 +30,7 @@ var BitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage,
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var pipeline = this.pipeline;
|
var pipeline = this.pipeline;
|
||||||
|
|
||||||
renderer.setPipeline(pipeline, src);
|
renderer.setPipeline(pipeline, src);
|
||||||
|
@ -77,7 +77,7 @@ var BitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage,
|
||||||
var tintBL = Utils.getTintAppendFloatAlpha(src._tintBL, camera.alpha * src._alphaBL);
|
var tintBL = Utils.getTintAppendFloatAlpha(src._tintBL, camera.alpha * src._alphaBL);
|
||||||
var tintBR = Utils.getTintAppendFloatAlpha(src._tintBR, camera.alpha * src._alphaBR);
|
var tintBR = Utils.getTintAppendFloatAlpha(src._tintBR, camera.alpha * src._alphaBR);
|
||||||
|
|
||||||
pipeline.setTexture2D(texture, 0);
|
var textureUnit = renderer.setTextureSource(frame.source);
|
||||||
|
|
||||||
var xAdvance = 0;
|
var xAdvance = 0;
|
||||||
var yAdvance = 0;
|
var yAdvance = 0;
|
||||||
|
@ -140,11 +140,11 @@ var BitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage,
|
||||||
{
|
{
|
||||||
lineOffsetX = (lineData.longest - lineData.lengths[currentLine]);
|
lineOffsetX = (lineData.longest - lineData.lengths[currentLine]);
|
||||||
}
|
}
|
||||||
|
|
||||||
xAdvance = 0;
|
xAdvance = 0;
|
||||||
yAdvance += lineHeight;
|
yAdvance += lineHeight;
|
||||||
lastGlyph = null;
|
lastGlyph = null;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ var BitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage,
|
||||||
ty3 = Math.round(ty3);
|
ty3 = Math.round(ty3);
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);
|
pipeline.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, textureUnit);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue