danchitnis/webgl-plot

Unnecessary depth buffer?

boris-ulyanov opened this issue · 2 comments

I couldn't find where the depth buffer is used, if it's true, it's better to turn it off:

this.webgl.enable(this.webgl.DEPTH_TEST);

or, if it is used, || (logical or) must be changed to | (bitwise or) in clear calls:

this.webgl.clear(this.webgl.COLOR_BUFFER_BIT || this.webgl.DEPTH_BUFFER_BIT);

this.webgl.clear(this.webgl.COLOR_BUFFER_BIT || this.webgl.DEPTH_BUFFER_BIT);

yes, depth is not being used (at least for now). I will investigate if switching it off affects anything in the library.

I have removed the depth buffer now, as it had no impact.