Skip to content

Commit 4fbdbb8

Browse files
committed
The error RENDER WARNING: there is no texture bound to the unit ... would be thrown when trying to restart a Scene. When a Scene is shutdown is will now reset the WebGL Texture cache. Fix phaserjs#5464
1 parent a765b7e commit 4fbdbb8

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/scene/Systems.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ var DefaultPlugins = require('../plugins/DefaultPlugins');
1010
var Events = require('./events');
1111
var GetPhysicsPlugins = require('./GetPhysicsPlugins');
1212
var GetScenePlugins = require('./GetScenePlugins');
13+
var GLOBAL_CONST = require('../const');
1314
var NOOP = require('../utils/NOOP');
1415
var Settings = require('./Settings');
1516

@@ -758,6 +759,11 @@ var Systems = new Class({
758759
settings.active = false;
759760
settings.visible = false;
760761

762+
if (this.renderer === GLOBAL_CONST.WEBGL)
763+
{
764+
this.renderer.resetTextures(true);
765+
}
766+
761767
events.emit(Events.SHUTDOWN, this, data);
762768
},
763769

0 commit comments

Comments
 (0)