web api instance method
WebGL2RenderingContext: bindSampler() method
Available in workers
The WebGL2RenderingContext.bindSampler() method of the WebGL 2 API binds a
passed WebGLSampler object to the texture unit at the passed index.
Syntax
bindSampler(unit, sampler)
Parameters
unit- : A
GLuintspecifying the index of the texture unit to which to bind the sampler to.
- : A
sampler- : A
WebGLSamplerobject to bind.
- : A
Return value
None (undefined).
Examples
const sampler = gl.createSampler();
gl.bindSampler(0, sampler);
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.