API Reference

Class List

StencilParameters

Holds stencil test settings.

Summary

Static Properties

DEFAULT

A default stencil state.[read only]

Properties

fail

Operation to perform if stencil test is failed.

func

A comparison function that decides if the pixel should be written, based on the current stencil buffer value, reference value, and mask value.

readMask

Mask applied to stencil buffer value and reference value before comparison.

ref

Sets stencil test reference value used in comparisons.

writeMask

A bit mask applied to the stencil value, when written.

zfail

Operation to perform if depth test is failed.

zpass

Operation to perform if both stencil and depth test are passed.

Methods

clone

Clone the stencil parameters.

copy

Copies the contents of a source stencil parameters to this stencil parameters.

Details

Static Properties

DEFAULT

A default stencil state.

[read only]

Constructor

StencilParameters([options])

Create a new StencilParameters instance.

Parameters

optionsobject

Options object to configure the stencil parameters.

Properties

numberfail

Operation to perform if stencil test is failed. Can be:

numberfunc

A comparison function that decides if the pixel should be written, based on the current stencil buffer value, reference value, and mask value. Can be:

numberreadMask

Mask applied to stencil buffer value and reference value before comparison.

numberref

Sets stencil test reference value used in comparisons.

numberwriteMask

A bit mask applied to the stencil value, when written.

numberzfail

Operation to perform if depth test is failed. Accepts the same values as fail.

numberzpass

Operation to perform if both stencil and depth test are passed. Accepts the same values as fail.

Methods

clone()

Clone the stencil parameters.

Returns

StencilParameters

A cloned StencilParameters object.

copy(rhs)

Copies the contents of a source stencil parameters to this stencil parameters.

Parameters

rhsStencilParameters

A stencil parameters to copy from.

Returns

StencilParameters

Self for chaining.