mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
Fixed RenderTexture in WebGL.
This commit is contained in:
parent
9c588d94e8
commit
f552615982
2 changed files with 13 additions and 4 deletions
|
@ -298,7 +298,7 @@ PIXI.Sprite.prototype._renderWebGL = function(renderSession, matrix)
|
|||
// A quick check to see if this element has a mask or a filter.
|
||||
if (this._mask || this._filters)
|
||||
{
|
||||
var spriteBatch = renderSession.spriteBatch;
|
||||
var spriteBatch = renderSession.spriteBatch;
|
||||
|
||||
// push filter first as we need to ensure the stencil buffer is correct for any masking
|
||||
if (this._filters)
|
||||
|
|
|
@ -208,9 +208,18 @@ PIXI.RenderTexture.prototype.renderWebGL = function(displayObject, matrix, clear
|
|||
return;
|
||||
}
|
||||
|
||||
// Frame buffers come in upside down so we need to flip the matrix
|
||||
matrix.translate(0, this.projection.y * 2);
|
||||
matrix.scale(1, -1);
|
||||
// Let's create a nice matrix to apply to our display object.
|
||||
// Frame buffers come in upside down so we need to flip the matrix.
|
||||
var wt = displayObject.worldTransform;
|
||||
wt.identity();
|
||||
wt.translate(0, this.projection.y * 2);
|
||||
|
||||
if (matrix)
|
||||
{
|
||||
wt.append(matrix);
|
||||
}
|
||||
|
||||
wt.scale(1, -1);
|
||||
|
||||
// Time to update all the children of the displayObject with the new matrix.
|
||||
for (var i = 0; i < displayObject.children.length; i++)
|
||||
|
|
Loading…
Reference in a new issue