mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
WebGLRenderer.preRender
now calls gl.clearColor
in order to restore the background clear color in case something, like a Render Texture, has changed it.
This commit is contained in:
parent
8ec71c7bd1
commit
4b1ea8db9b
1 changed files with 4 additions and 0 deletions
|
@ -1781,6 +1781,10 @@ var WebGLRenderer = new Class({
|
|||
|
||||
if (this.config.clearBeforeRender)
|
||||
{
|
||||
var clearColor = this.config.backgroundColor;
|
||||
|
||||
gl.clearColor(clearColor.redGL, clearColor.greenGL, clearColor.blueGL, 1);
|
||||
|
||||
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue