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 WebGL_API/Types specifying the index of the texture unit to which to bind the sampler to.
sampler- : A WebGLSampler object to bind.
Return value
None (undefined).
Examples
const sampler = gl.createSampler();
gl.bindSampler(0, sampler);
Specifications
Browser compatibility
See also
- WebGLSampler
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
