MCPcopy Create free account
hub / github.com/tensorflow/tfjs / bindTextureToProgramUniformSampler

Function bindTextureToProgramUniformSampler

tfjs-backend-webgl/src/webgl_util.ts:274–279  ·  view source on GitHub ↗
(
    gl: WebGLRenderingContext, texture: WebGLTexture,
    uniformSamplerLocation: WebGLUniformLocation, textureUnit: number)

Source from the content-addressed store, hash-verified

272}
273
274export function bindTextureToProgramUniformSampler(
275 gl: WebGLRenderingContext, texture: WebGLTexture,
276 uniformSamplerLocation: WebGLUniformLocation, textureUnit: number) {
277 callAndCheck(gl, () => bindTextureUnit(gl, texture, textureUnit));
278 callAndCheck(gl, () => gl.uniform1i(uniformSamplerLocation, textureUnit));
279}
280
281export function bindCanvasToFramebuffer(gl: WebGLRenderingContext) {
282 callAndCheck(gl, () => gl.bindFramebuffer(gl.FRAMEBUFFER, null));

Callers

nothing calls this directly

Calls 2

callAndCheckFunction · 0.85
bindTextureUnitFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…