Browse Source

fix(Web): clear color buffer when destroy

hujinliang 3 năm trước cách đây
mục cha
commit
ee92c4a92b
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      web/src/webgl-render-vap.ts

+ 1 - 0
web/src/webgl-render-vap.ts

@@ -336,6 +336,7 @@ export default class WebglRenderVap extends VapVideo {
     if (canvas) {
       canvas.parentNode && canvas.parentNode.removeChild(canvas);
     }
+    gl.clear(gl.COLOR_BUFFER_BIT);
     // glUtil.cleanWebGL(gl, this.shaders, this.program, this.textures, this.buffers)
     super.destroy();
     this.clearMemoryCache();