WebGL2RenderingContext: bindSampler() method
WebGL
WebGL
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 GLuint specifying the index of the texture unit to which to bind the sampler to.
sampler- : A WebGLSampler object to bind, or
nullto unbind the sampler from the texture unit and use the texture's sampling parameters instead.
Return value
None (undefined).
Examples
const sampler = gl.createSampler();
gl.bindSampler(0, sampler);
Specifications
Browser compatibility
See also
- WebGLSampler