setStencilReference method

  1. @override
void setStencilReference(
  1. int value
)
override

The value the stencil test compares against and StencilOperation.setToReferenceValue stores. Eight bits; zero until set.

A wider value keeps its low eight bits and loses the rest, on every backend, through StencilState.narrowReference — see it for why the three would otherwise each answer differently.

Implementation

@override
void setStencilReference(int value) {
  stencilReference = value;
  commands.add(RecordedStencilReference(value));
}