Skip to content

Commit 755fa26

Browse files
committed
Added camera alpha for webgl
1 parent b526646 commit 755fa26

2 files changed

Lines changed: 9 additions & 5 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: 'e049e450-5c1f-11e7-9524-ad80f9e5c5d2'
2+
build: '60b859e0-5c21-11e7-a554-cbd3f53fc69e'
33
};
44
module.exports = CHECKSUM;

v3/src/renderer/webgl/WebGLRenderer.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,14 @@ WebGLRenderer.prototype = {
323323
if (camera.backgroundColor.alphaGL > 0)
324324
{
325325
var color = camera.backgroundColor;
326-
327-
gl.clearColor(color.redGL, color.greenGL, color.blueGL, color.alphaGL);
328-
329-
gl.clear(gl.COLOR_BUFFER_BIT);
326+
var quadBatch = this.quadBatch;
327+
quadBatch.bind();
328+
quadBatch.add(
329+
camera.x, camera.y, camera.width, camera.height,
330+
color.redGL, color.greenGL, color.blueGL, color.alphaGL
331+
);
332+
quadBatch.flush();
333+
this.currentRenderer.bind();
330334
}
331335

332336
var list = children.list;

0 commit comments

Comments
 (0)