Fixed UV updates for WebGL textures.

This commit is contained in:
Richard Davey 2014-10-15 11:36:35 +01:00
parent 3fb5df95e6
commit 86cfc7111e
3 changed files with 11 additions and 9 deletions

View file

@ -293,6 +293,8 @@ Phaser.Image.prototype.loadTexture = function (key, frame) {
setFrame = !this.animations.loadFrameData(this.game.cache.getFrameData(key), frame);
}
}
this.texture.baseTexture.dirty();
if (setFrame)
{
@ -356,10 +358,8 @@ Phaser.Image.prototype.setFrame = function(frame) {
{
this.updateCrop();
}
else
{
this.texture.baseTexture.dirty();
}
this.texture._updateUvs();
};

View file

@ -409,6 +409,8 @@ Phaser.Sprite.prototype.loadTexture = function (key, frame, stopAnimation) {
setFrame = !this.animations.loadFrameData(this.game.cache.getFrameData(key), frame);
}
}
this.texture.baseTexture.dirty();
if (setFrame)
{
@ -472,10 +474,8 @@ Phaser.Sprite.prototype.setFrame = function(frame) {
{
this.updateCrop();
}
else
{
this.texture.baseTexture.dirty();
}
this.texture._updateUvs();
};

View file

@ -377,6 +377,8 @@ Phaser.TileSprite.prototype.loadTexture = function (key, frame) {
this.animations.loadFrameData(this.game.cache.getFrameData(key), frame);
}
}
this.texture.baseTexture.dirty();
};
@ -424,7 +426,7 @@ Phaser.TileSprite.prototype.setFrame = function(frame) {
this.texture.trim = null;
}
this.texture.baseTexture.dirty();
this.texture._updateUvs();
};