Firefox Tomorrow

web api instance method

WebGL2RenderingContext: bindSampler() method

View on MDN ↗

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 GLuint specifying the index of the texture unit to which to bind the sampler to.
  • sampler

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.

See also