summaryrefslogtreecommitdiff
path: root/src/core/stencil.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/stencil.h')
-rw-r--r--src/core/stencil.h28
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