UNPKG

772 BPlain TextView Raw
1import type {StencilOpConstant, StencilTestGL} from './types';
2
3const ALWAYS = 0x0207;
4const KEEP = 0x1E00;
5
6class StencilMode {
7 test: StencilTestGL;
8 ref: number;
9 mask: number;
10 fail: StencilOpConstant;
11 depthFail: StencilOpConstant;
12 pass: StencilOpConstant;
13
14 constructor(test: StencilTestGL, ref: number, mask: number, fail: StencilOpConstant,
15 depthFail: StencilOpConstant, pass: StencilOpConstant) {
16 this.test = test;
17 this.ref = ref;
18 this.mask = mask;
19 this.fail = fail;
20 this.depthFail = depthFail;
21 this.pass = pass;
22 }
23
24 static disabled: Readonly<StencilMode>;
25}
26
27StencilMode.disabled = new StencilMode({func: ALWAYS, mask: 0}, 0, 0, KEEP, KEEP, KEEP);
28
29export default StencilMode;