* Stops drawing shapes to the framebuffer. * * myBuffer.begin() and `myBuffer.end()` * allow shapes to be drawn to the framebuffer. * myBuffer.begin() begins drawing to * the framebuffer and `myBuffer.end()` sto
()
| 888 | * } |
| 889 | */ |
| 890 | end() { |
| 891 | this.renderer.pop(); |
| 892 | |
| 893 | const fbo = this.renderer.activeFramebuffers.pop(); |
| 894 | if (fbo !== this) { |
| 895 | throw new Error("It looks like you've called end() while another Framebuffer is active."); |
| 896 | } |
| 897 | this._beforeEnd(); |
| 898 | if (this.prevFramebuffer) { |
| 899 | this.prevFramebuffer._beforeBegin(); |
| 900 | } else { |
| 901 | this.renderer.bindFramebuffer(null); |
| 902 | this.renderer.viewport( |
| 903 | this.renderer._origViewport.width, |
| 904 | this.renderer._origViewport.height |
| 905 | ); |
| 906 | } |
| 907 | this.renderer._applyStencilTestIfClipping(); |
| 908 | } |
| 909 | |
| 910 | /** |
| 911 | * Draws to the framebuffer by calling a function that contains drawing |
no test coverage detected