stencilFunc method

void stencilFunc(
  1. GLenum func,
  2. GLint ref,
  3. GLuint mask
)

The WebGLRenderingContext.stencilFunc() method of the WebGL API sets the front and back function and reference value for stencil testing.

Stenciling enables and disables drawing on a per-pixel basis. It is typically used in multipass rendering to achieve special effects.

Implementation

external void stencilFunc(
  GLenum func,
  GLint ref,
  GLuint mask,
);