diff options
author | chai <chaifix@163.com> | 2019-12-21 22:24:15 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-12-21 22:24:15 +0800 |
commit | ec111247c614663d8231245a17c314b9b8b4a28c (patch) | |
tree | a66058508161da488371c90316865ae850b8be15 /src/core/stencil.h | |
parent | c3f45735ecfab6e567be371758f21395e92dfef6 (diff) |
*misc
Diffstat (limited to 'src/core/stencil.h')
-rw-r--r-- | src/core/stencil.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/core/stencil.h b/src/core/stencil.h new file mode 100644 index 0000000..8af73d0 --- /dev/null +++ b/src/core/stencil.h @@ -0,0 +1,28 @@ +#ifndef _SOFTSHADEROOM_STENCIL_H_ +#define _SOFTSHADEROOM_STENCIL_H_ + +#include "../util/type.h" + +typedef bool(*StencilFunc)(byte src, byte ref); + +bool stencil_always(byte src, byte ref); +bool stencil_never(byte src, byte ref); +bool stencil_less(byte src, byte ref); +bool stencil_equal(byte src, byte ref); +bool stencil_leuqal(byte src, byte ref); +bool stencil_greater(byte src, byte ref); +bool stencil_notequal(byte src, byte ref); +bool stencil_gequer(byte src, byte ref); + +typedef byte (*StencilOp)(byte src, byte ref); + +byte stencilop_keep(byte src, byte ref); +byte stencilop_zero(byte src, byte ref); +byte stencilop_replace(byte src, byte ref); +byte stencilop_incr(byte src, byte ref); +byte stencilop_incrwrap(byte src, byte ref); +byte stencilop_decr(byte src, byte ref); +byte stencilop_decrwrap(byte src, byte ref); +byte stencilop_invert(byte src, byte ref); + +#endif
\ No newline at end of file |