MCPcopy Index your code
hub / github.com/processing/p5.js / bindTextureToShader

Method bindTextureToShader

src/webgl/p5.RendererGL.js:1226–1232  ·  view source on GitHub ↗
({ texture }, sampler, uniformName, unit)

Source from the content-addressed store, hash-verified

1224 }
1225
1226 bindTextureToShader({ texture }, sampler, uniformName, unit) {
1227 const gl = this.GL;
1228 gl.activeTexture(gl.TEXTURE0 + unit);
1229 gl.bindTexture(gl.TEXTURE_2D, texture);
1230 const location = gl.getUniformLocation(glProgram, uniformName);
1231 gl.uniform1i(location, unit);
1232 }
1233
1234 setTextureParams(texture) {
1235 return setWebGLTextureParams(texture, this.GL, this.webglVersion);

Callers

nothing calls this directly

Calls 1

bindTextureMethod · 0.45

Tested by

no test coverage detected