Skip to content

Commit

Permalink
Add default value for cleared depth
Browse files Browse the repository at this point in the history
  • Loading branch information
davepagurek authored Dec 16, 2023
1 parent b7894ae commit d7b0aa0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/webgl/p5.RendererGL.js
Original file line number Diff line number Diff line change
Expand Up @@ -1511,8 +1511,8 @@ p5.RendererGL = class RendererGL extends p5.Renderer {
* Resets all depth information so that nothing previously drawn will
* occlude anything subsequently drawn.
*/
clearDepth() {
this.GL.clearDepth(1);
clearDepth(depth = 1) {
this.GL.clearDepth(depth);
this.GL.clear(this.GL.DEPTH_BUFFER_BIT);
}

Expand Down

0 comments on commit d7b0aa0

Please sign in to comment.