mirror of
https://github.com/photonstorm/phaser
synced 2024-11-14 17:07:43 +00:00
Merge pull request #4286 from gomachan7/fixup/apply_transparent_bg_on_webgl_renderer
Fix WebGLRenderer to apply transparent bg in config
This commit is contained in:
commit
f8f81a06f0
1 changed files with 2 additions and 2 deletions
|
@ -566,7 +566,7 @@ var WebGLRenderer = new Class({
|
|||
|
||||
gl.enable(gl.BLEND);
|
||||
|
||||
gl.clearColor(clearColor.redGL, clearColor.greenGL, clearColor.blueGL, 1);
|
||||
gl.clearColor(clearColor.redGL, clearColor.greenGL, clearColor.blueGL, clearColor.alphaGL);
|
||||
|
||||
// Initialize all textures to null
|
||||
for (var index = 0; index < this.currentTextures.length; ++index)
|
||||
|
@ -1813,7 +1813,7 @@ var WebGLRenderer = new Class({
|
|||
{
|
||||
var clearColor = this.config.backgroundColor;
|
||||
|
||||
gl.clearColor(clearColor.redGL, clearColor.greenGL, clearColor.blueGL, 1);
|
||||
gl.clearColor(clearColor.redGL, clearColor.greenGL, clearColor.blueGL, clearColor.alphaGL);
|
||||
|
||||
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue