Skip to content

Commit b3db404

Browse files
committed
BG Color added to webgl renderer.
1 parent 2edfa51 commit b3db404

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

v3/src/checksum.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
var CHECKSUM = {
2-
build: 'a93a63e0-f068-11e6-8898-3dfb7b565f68'
2+
build: 'fc14ac40-f097-11e6-b7b1-9f26f68f5d91'
33
};
44
module.exports = CHECKSUM;

v3/src/renderer/webgl/WebGLRenderer.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ WebGLRenderer.prototype = {
109109
gl.disable(gl.CULL_FACE);
110110
gl.enable(gl.BLEND);
111111

112-
gl.clearColor(1, 0, 0, 1);
112+
var color = this.game.config.backgroundColor;
113+
114+
gl.clearColor(color.redGL, color.greenGL, color.blueGL, color.alphaGL);
113115

114116
this.resize(this.width, this.height);
115117

@@ -245,7 +247,11 @@ WebGLRenderer.prototype = {
245247
var gl = this.gl;
246248

247249
// clear is needed for the FBO, otherwise corruption ...
248-
gl.clear(gl.COLOR_BUFFER_BIT);
250+
// gl.clear(gl.COLOR_BUFFER_BIT);
251+
252+
var color = this.game.config.backgroundColor;
253+
254+
gl.clearColor(color.redGL, color.greenGL, color.blueGL, color.alphaGL);
249255

250256
this.setBlendMode(BlendModes.NORMAL);
251257
},

0 commit comments

Comments
 (0)