StencilAttrib
from panda3d.core import StencilAttrib
- class StencilAttrib
Bases:
Bases:
RenderAttrib
A StencilAttrib is a collection of all stencil render states. The render states in a StencilAttrib are read-only. A StencilAttrib is created with make or
make_2_sided()
. To determine if two sided stencil is supported, call the function GraphicsStateGuardian:: get_supports_two_sided_stencil.Inheritance diagram
-
enum StencilComparisonFunction
Exists purely for backward compatibility.
-
enumerator SCF_never = 1
-
enumerator SCF_less_than = 2
-
enumerator SCF_equal = 3
-
enumerator SCF_less_than_or_equal = 4
-
enumerator SCF_greater_than = 5
-
enumerator SCF_not_equal = 6
-
enumerator SCF_greater_than_or_equal = 7
-
enumerator SCF_always = 8
-
enumerator SCF_never = 1
-
enum StencilOperation
-
enumerator SO_keep = 0
-
enumerator SO_zero = 1
-
enumerator SO_replace = 2
-
enumerator SO_increment = 3
-
enumerator SO_decrement = 4
-
enumerator SO_invert = 5
-
enumerator SO_increment_saturate = 6
-
enumerator SO_decrement_saturate = 7
-
enumerator SO_keep = 0
-
enum StencilRenderState
enums are duplicated here from class StencilRenderStates for use in Python
-
enumerator SRS_front_comparison_function = 0
-
enumerator SRS_front_stencil_fail_operation = 1
-
enumerator SRS_front_stencil_pass_z_fail_operation = 2
-
enumerator SRS_front_stencil_pass_z_pass_operation = 3
-
enumerator SRS_reference = 4
-
enumerator SRS_read_mask = 5
-
enumerator SRS_write_mask = 6
-
enumerator SRS_back_comparison_function = 7
-
enumerator SRS_back_stencil_fail_operation = 8
-
enumerator SRS_back_stencil_pass_z_fail_operation = 9
-
enumerator SRS_back_stencil_pass_z_pass_operation = 10
-
enumerator SRS_clear = 11
-
enumerator SRS_clear_value = 12
-
enumerator SRS_total = 13
-
enumerator SRS_front_comparison_function = 0
- static get_class_type() TypeHandle
- static make(front_enable: bool, front_comparison_function: PandaCompareFunc, stencil_fail_operation: StencilOperation, stencil_pass_z_fail_operation: StencilOperation, front_stencil_pass_z_pass_operation: StencilOperation, reference: int, read_mask: int, write_mask: int) RenderAttrib
Constructs a front face
StencilAttrib
.
- static make_2_sided(front_enable: bool, back_enable: bool, front_comparison_function: PandaCompareFunc, stencil_fail_operation: StencilOperation, stencil_pass_z_fail_operation: StencilOperation, front_stencil_pass_z_pass_operation: StencilOperation, reference: int, read_mask: int, write_mask: int, back_comparison_function: PandaCompareFunc, back_stencil_fail_operation: StencilOperation, back_stencil_pass_z_fail_operation: StencilOperation, back_stencil_pass_z_pass_operation: StencilOperation) RenderAttrib
Constructs a two-sided
StencilAttrib
.
- static make_2_sided_with_clear(front_enable: bool, back_enable: bool, front_comparison_function: PandaCompareFunc, stencil_fail_operation: StencilOperation, stencil_pass_z_fail_operation: StencilOperation, front_stencil_pass_z_pass_operation: StencilOperation, reference: int, read_mask: int, write_mask: int, back_comparison_function: PandaCompareFunc, back_stencil_fail_operation: StencilOperation, back_stencil_pass_z_fail_operation: StencilOperation, back_stencil_pass_z_pass_operation: StencilOperation, clear: bool, clear_value: int) RenderAttrib
Constructs a two-sided
StencilAttrib
.
- static make_default() RenderAttrib
Returns a
RenderAttrib
that corresponds to whatever the standard default properties for render attributes of this type ought to be.
- static make_off() RenderAttrib
Constructs a
StencilAttrib
that has stenciling turned off.
- static make_with_clear(front_enable: bool, front_comparison_function: PandaCompareFunc, stencil_fail_operation: StencilOperation, stencil_pass_z_fail_operation: StencilOperation, front_stencil_pass_z_pass_operation: StencilOperation, reference: int, read_mask: int, write_mask: int, clear: bool, clear_value: int) RenderAttrib
Constructs a front face
StencilAttrib
.
-
enum StencilComparisonFunction