(gl: WebGLRenderingContext)
| 525 | } |
| 526 | |
| 527 | _prepareGLObjects(gl: WebGLRenderingContext): void { |
| 528 | const [width, height] = this.getGLSize(); |
| 529 | const { glParent, glSurface } = this.context; |
| 530 | if (glParent === glSurface) { |
| 531 | invariant( |
| 532 | !this.drawProps.backbuffering, |
| 533 | "`backbuffering` is currently not supported for a Root Node. " + |
| 534 | "Try to wrap %s in a <LinearCopy> or <NearestCopy>.", |
| 535 | this.getGLName() |
| 536 | ); |
| 537 | } else { |
| 538 | const fbo = createFBO(gl, width, height); |
| 539 | this.framebuffer = fbo; |
| 540 | if (this.drawProps.backbuffering) { |
| 541 | const fbo = createFBO(gl, width, height); |
| 542 | this.backbuffer = fbo; |
| 543 | } |
| 544 | } |
| 545 | } |
| 546 | |
| 547 | _onContextLost(): void { |
| 548 | this.dependencies.forEach((d) => d._onContextLost()); |
no test coverage detected