Skip to content

Commit

Permalink
Merge pull request #509 from KhronosGroup/fix/background-color
Browse files Browse the repository at this point in the history
Fix clear color
  • Loading branch information
jim-ec authored Nov 23, 2023
2 parents 25c4f71 + cef3ccc commit 5914e33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/Renderer/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@ class gltfRenderer
clearFrame(clearColor)
{
this.webGl.context.bindFramebuffer(this.webGl.context.FRAMEBUFFER, null);
this.webGl.context.clearColor(clearColor[0] / 255.0, clearColor[1] / 255.0, clearColor[2] / 255.0, clearColor[3] / 255.0);
this.webGl.context.clearColor(...clearColor);
this.webGl.context.clear(GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT);
this.webGl.context.bindFramebuffer(this.webGl.context.FRAMEBUFFER, this.opaqueFramebuffer);
this.webGl.context.clearColor(clearColor[0] / 255.0, clearColor[1] / 255.0, clearColor[2] / 255.0, clearColor[3] / 255.0);
this.webGl.context.clearColor(...clearColor);
this.webGl.context.clear(GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT);
this.webGl.context.bindFramebuffer(this.webGl.context.FRAMEBUFFER, null);
this.webGl.context.bindFramebuffer(this.webGl.context.FRAMEBUFFER, this.opaqueFramebufferMSAA);
this.webGl.context.clearColor(clearColor[0] / 255.0, clearColor[1] / 255.0, clearColor[2] / 255.0, clearColor[3] / 255.0);
this.webGl.context.clearColor(...clearColor);
this.webGl.context.clear(GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT);
this.webGl.context.bindFramebuffer(this.webGl.context.FRAMEBUFFER, null);
}
Expand Down

0 comments on commit 5914e33

Please sign in to comment.