mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Fixed PostFX on custom render objects
This commit is contained in:
parent
392640fe93
commit
5805925cc6
3 changed files with 10 additions and 10 deletions
|
@ -40,6 +40,9 @@ var DynamicBitmapTextWebGLRenderer = function (renderer, src, camera, parentMatr
|
|||
|
||||
var result = GetCalcMatrix(src, camera, parentMatrix);
|
||||
|
||||
// This causes a flush if the BitmapText has a Post Pipeline
|
||||
renderer.pipelines.preBatch(src);
|
||||
|
||||
var spriteMatrix = result.sprite;
|
||||
var calcMatrix = result.calc;
|
||||
|
||||
|
@ -117,8 +120,6 @@ var DynamicBitmapTextWebGLRenderer = function (renderer, src, camera, parentMatr
|
|||
var displayCallback = src.displayCallback;
|
||||
var callbackData = src.callbackData;
|
||||
|
||||
renderer.pipelines.preBatch(src);
|
||||
|
||||
for (var i = 0; i < textLength; i++)
|
||||
{
|
||||
charCode = text.charCodeAt(i);
|
||||
|
|
|
@ -38,6 +38,9 @@ var BitmapTextWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
|
||||
var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;
|
||||
|
||||
// This causes a flush if the BitmapText has a Post Pipeline
|
||||
renderer.pipelines.preBatch(src);
|
||||
|
||||
var roundPixels = camera.roundPixels;
|
||||
|
||||
var cameraAlpha = camera.alpha;
|
||||
|
@ -70,8 +73,6 @@ var BitmapTextWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
|
||||
var dropShadow = (dropShadowX !== 0 || dropShadowY !== 0);
|
||||
|
||||
renderer.pipelines.preBatch(src);
|
||||
|
||||
if (dropShadow)
|
||||
{
|
||||
var srcShadowColor = src.dropShadowColor;
|
||||
|
|
|
@ -37,6 +37,9 @@ var NineSliceWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
|
||||
var calcMatrix = GetCalcMatrix(src, camera, parentMatrix, false).calc;
|
||||
|
||||
// This causes a flush if the NineSlice has a Post Pipeline
|
||||
renderer.pipelines.preBatch(src);
|
||||
|
||||
var textureUnit = pipeline.setGameObject(src);
|
||||
|
||||
var F32 = pipeline.vertexViewF32;
|
||||
|
@ -50,8 +53,6 @@ var NineSliceWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
var alpha = camera.alpha * src.alpha;
|
||||
var color = Utils.getTintAppendFloatAlpha(src.tint, alpha);
|
||||
|
||||
renderer.pipelines.preBatch(src);
|
||||
|
||||
var available = pipeline.vertexAvailable();
|
||||
var flushCount = -1;
|
||||
|
||||
|
@ -68,10 +69,7 @@ var NineSliceWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
{
|
||||
pipeline.flush();
|
||||
|
||||
if (!pipeline.currentBatch)
|
||||
{
|
||||
textureUnit = pipeline.setGameObject(src);
|
||||
}
|
||||
textureUnit = pipeline.setGameObject(src);
|
||||
|
||||
vertexOffset = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue