mirror of
https://github.com/photonstorm/phaser
synced 2024-11-28 15:41:37 +00:00
Tidy up wrappers on WebGLRenderer destroy.
This commit is contained in:
parent
4fd8fc94c3
commit
d57b46e690
1 changed files with 13 additions and 0 deletions
|
@ -3169,6 +3169,19 @@ var WebGLRenderer = new Class({
|
|||
{
|
||||
this.canvas.removeEventListener('webglcontextlost', this.contextLostHandler, false);
|
||||
|
||||
this.canvas.removeEventListener('webglcontextrestored', this.contextRestoredHandler, false);
|
||||
|
||||
var wrapperDestroy = function (wrapper)
|
||||
{
|
||||
wrapper.destroy();
|
||||
};
|
||||
ArrayEach(this.glAttribLocationWrappers, wrapperDestroy);
|
||||
ArrayEach(this.glBufferWrappers, wrapperDestroy);
|
||||
ArrayEach(this.glFramebufferWrappers, wrapperDestroy);
|
||||
ArrayEach(this.glProgramWrappers, wrapperDestroy);
|
||||
ArrayEach(this.glTextureWrappers, wrapperDestroy);
|
||||
ArrayEach(this.glUniformLocationWrappers, wrapperDestroy);
|
||||
|
||||
this.maskTarget.destroy();
|
||||
this.maskSource.destroy();
|
||||
|
||||
|
|
Loading…
Reference in a new issue