TileSprite was missing a gl reference, causing it to fail during a context loss and restore.

This commit is contained in:
Richard Davey 2018-02-16 18:54:33 +00:00
parent d23688c3e4
commit 5b4b5de075

View file

@ -179,6 +179,7 @@ var TileSprite = new Class({
scene.sys.game.renderer.onContextRestored(function (renderer) scene.sys.game.renderer.onContextRestored(function (renderer)
{ {
var gl = renderer.gl;
this.tileTexture = null; this.tileTexture = null;
this.dirty = true; this.dirty = true;
this.tileTexture = renderer.createTexture2D(0, gl.LINEAR, gl.LINEAR, gl.REPEAT, gl.REPEAT, gl.RGBA, this.canvasBuffer, this.potWidth, this.potHeight); this.tileTexture = renderer.createTexture2D(0, gl.LINEAR, gl.LINEAR, gl.REPEAT, gl.REPEAT, gl.RGBA, this.canvasBuffer, this.potWidth, this.potHeight);