from panda3d.egg import 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 the
EggPolygonlevel with multiple appearances of the
EggObjectbase class. And making
EggObjecta virtual base class is just no fun.
Specifies implementation of transparency.
enumerator AM_unspecified = 0¶
enumerator AM_off = 1¶
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¶
enumerator AM_ms_mask = 6¶
enumerator AM_binary = 7¶
enumerator AM_dual = 8¶
enumerator AM_premultiplied = 9¶
- enumerator AM_unspecified = 0¶
- __init__(copy: EggRenderMode)
Removes the depth-offset flag from this particular object. See
- getAlphaMode() AlphaMode ¶
Returns the alpha mode that was set, or AM_unspecified if nothing was set. See
- getBin() str ¶
Returns the bin name that has been set for this particular object, if any. See
- getDepthOffset() int ¶
Returns the “depth-offset” flag as set for this particular object. See
- getDepthTestMode() DepthTestMode ¶
Returns the depth_test mode that was set, or DTM_unspecified if nothing was set. See
- getDepthWriteMode() DepthWriteMode ¶
Returns the depth_write mode that was set, or DWM_unspecified if nothing was set. See
- getDrawOrder() int ¶
Returns the “draw-order” flag as set for this particular object. See
- getVisibilityMode() VisibilityMode ¶
Returns the visibility mode that was set, or VM_unspecified if nothing was set. See
- hasDepthOffset() bool ¶
Returns true if the depth-offset flag has been set for this particular object. See
- hasDrawOrder() bool ¶
Returns true if the draw-order flag has been set for this particular object. See
- setAlphaMode(mode: AlphaMode)¶
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.
- setBin(bin: str)¶
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 also
- setDepthOffset(bias: int)¶
- setDepthTestMode(mode: DepthTestMode)¶
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.
- setDepthWriteMode(mode: DepthWriteMode)¶
Specifies whether writes should be made to the depth buffer (assuming the rendering backend provides a depth buffer) when rendering this geometry.
- setDrawOrder(order: int)¶
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
- setVisibilityMode(mode: VisibilityMode)¶
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 stringAlphaMode(string: str) AlphaMode ¶
AlphaModevalue associated with the given string representation, or AM_unspecified if the string does not match any known
- static stringDepthTestMode(string: str) DepthTestMode ¶
DepthTestModevalue associated with the given string representation, or DTM_unspecified if the string does not match any known
- static stringDepthWriteMode(string: str) DepthWriteMode ¶
DepthWriteModevalue associated with the given string representation, or DWM_unspecified if the string does not match any known
- static stringVisibilityMode(string: str) VisibilityMode ¶
Returns the HiddenMode value associated with the given string representation, or VM_unspecified if the string does not match any known HiddenMode value.
- enum AlphaMode¶