StencilAttrib
-
class StencilAttrib
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 int get_class_slot(void)
-
static TypeHandle get_class_type(void)
-
unsigned int get_render_state(StencilAttrib::StencilRenderState render_state_identifier) const
Returns render state.
-
static ConstPointerTo<RenderAttrib> make(bool front_enable, RenderAttrib::PandaCompareFunc front_comparison_function, StencilOperation stencil_fail_operation, StencilOperation stencil_pass_z_fail_operation, StencilOperation front_stencil_pass_z_pass_operation, unsigned int reference, unsigned int read_mask, unsigned int write_mask = (~(unsigned int)(0)))
Constructs a front face
StencilAttrib
.
-
static ConstPointerTo<RenderAttrib> make_2_sided(bool front_enable, bool back_enable, RenderAttrib::PandaCompareFunc front_comparison_function, StencilOperation stencil_fail_operation, StencilOperation stencil_pass_z_fail_operation, StencilOperation front_stencil_pass_z_pass_operation, unsigned int reference, unsigned int read_mask, unsigned int write_mask, RenderAttrib::PandaCompareFunc back_comparison_function, StencilOperation back_stencil_fail_operation, StencilOperation back_stencil_pass_z_fail_operation, StencilOperation back_stencil_pass_z_pass_operation)
Constructs a two-sided
StencilAttrib
.
-
static ConstPointerTo<RenderAttrib> make_2_sided_with_clear(bool front_enable, bool back_enable, RenderAttrib::PandaCompareFunc front_comparison_function, StencilOperation stencil_fail_operation, StencilOperation stencil_pass_z_fail_operation, StencilOperation front_stencil_pass_z_pass_operation, unsigned int reference, unsigned int read_mask, unsigned int write_mask, RenderAttrib::PandaCompareFunc back_comparison_function, StencilOperation back_stencil_fail_operation, StencilOperation back_stencil_pass_z_fail_operation, StencilOperation back_stencil_pass_z_pass_operation, bool clear, unsigned int clear_value)
Constructs a two-sided
StencilAttrib
.
-
static ConstPointerTo<RenderAttrib> make_default(void)
Returns a
RenderAttrib
that corresponds to whatever the standard default properties for render attributes of this type ought to be.
-
static ConstPointerTo<RenderAttrib> make_off(void)
Constructs a
StencilAttrib
that has stenciling turned off.
-
static ConstPointerTo<RenderAttrib> make_with_clear(bool front_enable, RenderAttrib::PandaCompareFunc front_comparison_function, StencilOperation stencil_fail_operation, StencilOperation stencil_pass_z_fail_operation, StencilOperation front_stencil_pass_z_pass_operation, unsigned int reference, unsigned int read_mask, unsigned int write_mask, bool clear, unsigned int clear_value)
Constructs a front face
StencilAttrib
.
-
enum StencilComparisonFunction