WebGL2RenderingContext: getSamplerParameter() method

Note: This feature is available in Web Workers.

The WebGL2RenderingContext.getSamplerParameter() method of the WebGL 2 API returns parameter information of a WebGLSampler object.

Syntax

js
getSamplerParameter(sampler, pname)

Parameters

sampler

A WebGLSampler object.

pname

A GLenum specifying which information to return. Possible values:

Return value

Depends on the pname parameter, either a GLenum or a GLfloat.

Examples

js
const sampler = gl.createSampler();
gl.getSamplerParameter(sampler, gl.TEXTURE_COMPARE_FUNC);

Specifications

See also