EggRenderMode¶
-
class EggRenderMode¶
This class stores miscellaneous rendering properties that is associated with geometry, and which may be set on the geometry primitive level, on the group above it, or indirectly via a texture. It’s intended to be a base class for egg objects that can have these properties set.
This class cannot inherit from
EggObject, because it causes problems at theEggPolygonlevel with multiple appearances of theEggObjectbase class. And makingEggObjecta virtual base class is just no fun.Inheritance diagram
digraph inheritance20dd1cb09f { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "EggRenderMode" [URL="acron.egg.EggRenderMode.html#acron.egg.EggRenderMode",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "EggRenderMode" [arrowsize=0.75,style=""]; }-
enum AlphaMode¶
Specifies implementation of transparency.
-
enumerator AM_unspecified = 0¶
-
enumerator AM_off = 1¶
No transparency.
-
enumerator AM_on = 2¶
Use whatever the default model is.
-
enumerator AM_blend = 3¶
Normal alpha blending, e.g. TransparencyAttrib::M_alpha.
-
enumerator AM_blend_no_occlude = 4¶
Alpha blending w/o depth write.
-
enumerator AM_ms = 5¶
TransparencyAttrib::M_multisample
-
enumerator AM_ms_mask = 6¶
TransparencyAttrib::M_multisample_mask
-
enumerator AM_binary = 7¶
TransparencyAttrib::M_binary
-
enumerator AM_dual = 8¶
TransparencyAttrib::M_dual
-
enumerator AM_premultiplied = 9¶
TransparencyAttrib::M_premultiplied_alpha
-
enumerator AM_unspecified = 0¶
- EggRenderMode.__eq__()¶
Comparison operators are handy.
- EggRenderMode.__init__()¶
- EggRenderMode.__lt__()¶
- EggRenderMode.__ne__()¶
- EggRenderMode.assign()¶
- EggRenderMode.clear_bin()¶
Removes the bin name that was set for this particular object. See
set_bin().
- EggRenderMode.clear_depth_offset()¶
Removes the depth-offset flag from this particular object. See
set_depth_offset().
- EggRenderMode.clear_draw_order()¶
Removes the draw-order flag from this particular object. See
set_draw_order().
- EggRenderMode.get_alpha_mode()¶
Returns the alpha mode that was set, or AM_unspecified if nothing was set. See
set_alpha_mode().
- EggRenderMode.get_bin()¶
Returns the bin name that has been set for this particular object, if any. See
set_bin().
- static EggRenderMode.get_class_type()¶
- EggRenderMode.get_depth_offset()¶
Returns the “depth-offset” flag as set for this particular object. See
set_depth_offset().
- EggRenderMode.get_depth_test_mode()¶
Returns the depth_test mode that was set, or DTM_unspecified if nothing was set. See
set_depth_test_mode().
- EggRenderMode.get_depth_write_mode()¶
Returns the depth_write mode that was set, or DWM_unspecified if nothing was set. See
set_depth_write_mode().
- EggRenderMode.get_draw_order()¶
Returns the “draw-order” flag as set for this particular object. See
set_draw_order().
- EggRenderMode.get_visibility_mode()¶
Returns the visibility mode that was set, or VM_unspecified if nothing was set. See
set_visibility_mode().
- EggRenderMode.has_bin()¶
Returns true if a bin name has been set for this particular object. See
set_bin().
- EggRenderMode.has_depth_offset()¶
Returns true if the depth-offset flag has been set for this particular object. See
set_depth_offset().
- EggRenderMode.has_draw_order()¶
Returns true if the draw-order flag has been set for this particular object. See
set_draw_order().
- EggRenderMode.set_alpha_mode()¶
Specifies precisely how the transparency for this geometry should be achieved, or if it should be used. The default, AM_unspecified, is to use transparency if the geometry has a color whose alpha value is non-1, or if it has a four-channel texture applied; otherwise, AM_on forces transparency on, and AM_off forces it off. The other flavors of transparency are specific ways to turn on transparency, which may or may not be supported by a particular rendering backend.
- EggRenderMode.set_bin()¶
Sets the “bin” string for this particular object. This names a particular bin in which the object should be rendered. The exact meaning of a bin is implementation defined, but generally a GeomBin matching each bin name must also be specifically added to the rendering engine (e.g. the
CullTraverser) in use for this to work. See alsoset_draw_order().
- EggRenderMode.set_depth_offset()¶
Sets the “depth-offset” flag associated with this object. This adds or subtracts an offset bias into the depth buffer. See also
DepthOffsetAttribandNodePath::set_depth_offset().
- EggRenderMode.set_depth_test_mode()¶
Specifies whether this geometry should be tested against the depth buffer when it is drawn (assuming the rendering backend provides a depth buffer). Note that this is different, and independent from, the depth_write mode.
- EggRenderMode.set_depth_write_mode()¶
Specifies whether writes should be made to the depth buffer (assuming the rendering backend provides a depth buffer) when rendering this geometry.
- EggRenderMode.set_draw_order()¶
Sets the “draw-order” flag associated with this object. This specifies a particular order in which objects of this type should be drawn, within the specified bin. If a bin is not explicitly specified, “fixed” is used. See also
set_bin().
- EggRenderMode.set_visibility_mode()¶
Specifies whether this geometry is to be considered normally visible, or hidden. If it is hidden, it is either not loaded into the scene graph at all, or loaded as a “stashed” node, according to the setting of egg- suppress-hidden.
- static EggRenderMode.string_alpha_mode()¶
Returns the
AlphaModevalue associated with the given string representation, or AM_unspecified if the string does not match any knownAlphaModevalue.
- static EggRenderMode.string_depth_test_mode()¶
Returns the
DepthTestModevalue associated with the given string representation, or DTM_unspecified if the string does not match any knownDepthTestModevalue.
- static EggRenderMode.string_depth_write_mode()¶
Returns the
DepthWriteModevalue associated with the given string representation, or DWM_unspecified if the string does not match any knownDepthWriteModevalue.
- static EggRenderMode.string_visibility_mode()¶
Returns the HiddenMode value associated with the given string representation, or VM_unspecified if the string does not match any known HiddenMode value.
- EggRenderMode.write()¶
Writes the attributes to the indicated output stream in Egg format.
-
enum AlphaMode¶