mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
Added destroy method
This commit is contained in:
parent
42610c4fa6
commit
f83cf124aa
1 changed files with 21 additions and 0 deletions
|
@ -559,6 +559,27 @@ var PostFXPipeline = new Class({
|
||||||
gl.bindTexture(gl.TEXTURE_2D, null);
|
gl.bindTexture(gl.TEXTURE_2D, null);
|
||||||
gl.bindFramebuffer(gl.FRAMEBUFFER, renderer.currentFramebuffer);
|
gl.bindFramebuffer(gl.FRAMEBUFFER, renderer.currentFramebuffer);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroys all shader instances, removes all object references and nulls all external references.
|
||||||
|
*
|
||||||
|
* @method Phaser.Renderer.WebGL.Pipelines.PostFXPipeline#destroy
|
||||||
|
* @since 3.60.0
|
||||||
|
*/
|
||||||
|
destroy: function ()
|
||||||
|
{
|
||||||
|
this.controller.destroy();
|
||||||
|
|
||||||
|
this.gameObject = null;
|
||||||
|
this.controller = null;
|
||||||
|
this.colorMatrix = null;
|
||||||
|
this.fullFrame1 = null;
|
||||||
|
this.fullFrame2 = null;
|
||||||
|
this.halfFrame1 = null;
|
||||||
|
this.halfFrame2 = null;
|
||||||
|
|
||||||
|
WebGLPipeline.prototype.destroy.call(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue