()
| 313 | }; |
| 314 | |
| 315 | _destroyGL() { |
| 316 | const { gl } = this; |
| 317 | if (gl) { |
| 318 | this.gl = null; |
| 319 | if (this._emptyTexture) { |
| 320 | gl.deleteTexture(this._emptyTexture); |
| 321 | this._emptyTexture = null; |
| 322 | } |
| 323 | if (this.loaderResolver) { |
| 324 | this.loaderResolver.dispose(); |
| 325 | } |
| 326 | for (let k in this.shaders) { |
| 327 | this.shaders[k].dispose(); |
| 328 | } |
| 329 | this.shaders = {}; |
| 330 | gl.deleteBuffer(this.buffer); |
| 331 | this.getVisitors().map((v) => |
| 332 | v.onSurfaceGLContextChange(this as any, null) |
| 333 | ); |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | _prepareGL( |
| 338 | gl: WebGLRenderingContext, |
no test coverage detected