MCPcopy
hub / github.com/processing/p5.js / end

Method end

src/webgl/p5.Framebuffer.js:890–908  ·  view source on GitHub ↗

* 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

()

Source from the content-addressed store, hash-verified

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

Callers 15

drawMethod · 0.95
buildParamDocsFunction · 0.80
drawFunction · 0.80
drawFunction · 0.80
timerangeToArrayFunction · 0.80
timerangeToArrayFunction · 0.80
timerangeToArrayFunction · 0.80
mouse.jsFile · 0.80
keyboard.jsFile · 0.80
p5.Framebuffer.jsFile · 0.80
p5.Shader.jsFile · 0.80
p5.RendererGL.jsFile · 0.80

Calls 6

_beforeEndMethod · 0.95
_beforeBeginMethod · 0.80
popMethod · 0.45
bindFramebufferMethod · 0.45
viewportMethod · 0.45

Tested by

no test coverage detected