Fix WebGLRenderer to apply transparent bg in config

This commit is contained in:
gomachan_7 2019-01-10 02:17:53 +09:00
parent 7513a1c351
commit be562abd83

View file

@ -556,7 +556,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)
@ -1795,7 +1795,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);
}