noErase() is not working in WEBGL

The following example does not work the way it should. Once erase() is called it just erases everything. noErase() is not stopping the mode.

I think I might found the bug.

 switch (this.curBlendMode) {
              case constants.BLEND:
              case constants.ADD:
                gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);

The case constants.BLEND is empty and since its the default noErase() does not reset back to what it should be.

Call blendMode(ADD) right after noErase();

Hello @vheun, and welcome to the forum!

The link you provide contains three examples. Which one doesn’t work as it should?

The last one. WebGL.

1 Like