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

Method _unbindFramebufferTexture

src/webgl/p5.RendererGL.js:1176–1185  ·  view source on GitHub ↗
(uniform)

Source from the content-addressed store, hash-verified

1174 }
1175
1176 _unbindFramebufferTexture(uniform) {
1177 // Make sure an empty texture is bound to the slot so that we don't
1178 // accidentally leave a framebuffer bound, causing a feedback loop
1179 // when something else tries to write to it
1180 const gl = this.GL;
1181 const empty = this._getEmptyTexture();
1182 gl.activeTexture(gl.TEXTURE0 + uniform.samplerIndex);
1183 empty.bindTexture();
1184 gl.uniform1i(uniform.location, uniform.samplerIndex);
1185 }
1186
1187 createTexture({ width, height, format, dataType }) {
1188 const gl = this.GL;

Callers 1

unbindTexturesMethod · 0.45

Calls 2

_getEmptyTextureMethod · 0.80
bindTextureMethod · 0.45

Tested by

no test coverage detected