TextureStage¶
-
class TextureStage¶
Bases:
TypedWritableReferenceCountDefines the properties of a named stage of the multitexture pipeline. The
TextureAttribwill associated a number of these stages with Texture objects, and the GSG will render geometry by sorting all of the currently active TextureStages in order and then issuing the appropriate rendering calls to activate them.Inheritance diagram
digraph inheritance5cc3e78187 { 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=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",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" -> "ReferenceCount" [arrowsize=0.75,style=""]; "TextureStage" [URL="acron.core.TextureStage.html#acron.core.TextureStage",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritableReferenceCount" -> "TextureStage" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",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" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedWritable" [URL="acron.core.TypedWritable.html#acron.core.TypedWritable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedWritable" [arrowsize=0.75,style=""]; "TypedWritableReferenceCount" [URL="acron.core.TypedWritableReferenceCount.html#acron.core.TypedWritableReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritable" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; }-
enum CombineMode¶
-
enumerator CM_undefined = 0¶
-
enumerator CM_replace = 1¶
-
enumerator CM_modulate = 2¶
-
enumerator CM_add = 3¶
-
enumerator CM_add_signed = 4¶
-
enumerator CM_interpolate = 5¶
-
enumerator CM_subtract = 6¶
-
enumerator CM_dot3_rgb = 7¶
The following are valid only for combine_rgb, not combine_alpha.
-
enumerator CM_dot3_rgba = 8¶
-
enumerator CM_undefined = 0¶
-
enum CombineOperand¶
-
enumerator CO_undefined = 0¶
-
enumerator CO_src_color = 1¶
-
enumerator CO_one_minus_src_color = 2¶
-
enumerator CO_src_alpha = 3¶
-
enumerator CO_one_minus_src_alpha = 4¶
-
enumerator CO_undefined = 0¶
-
enum CombineSource¶
-
enumerator CS_undefined = 0¶
-
enumerator CS_texture = 1¶
-
enumerator CS_constant = 2¶
-
enumerator CS_primary_color = 3¶
-
enumerator CS_previous = 4¶
-
enumerator CS_constant_color_scale = 5¶
-
enumerator CS_last_saved_result = 6¶
-
enumerator CS_undefined = 0¶
-
enum Mode¶
-
enumerator M_modulate = 0¶
-
enumerator M_decal = 1¶
-
enumerator M_blend = 2¶
-
enumerator M_replace = 3¶
-
enumerator M_add = 4¶
-
enumerator M_combine = 5¶
-
enumerator M_blend_color_scale = 6¶
-
enumerator M_modulate_glow = 7¶
When fixed-function, equivalent to modulate.
-
enumerator M_modulate_gloss = 8¶
When fixed-function, equivalent to modulate.
-
enumerator M_normal = 9¶
-
enumerator M_normal_height = 10¶
-
enumerator M_glow = 11¶
Rarely used: modulate_glow is more efficient.
-
enumerator M_gloss = 12¶
Rarely used: modulate_gloss is more efficient.
-
enumerator M_height = 13¶
Rarely used: normal_height is more efficient.
-
enumerator M_metallic_roughness = 14¶
metalness in B, roughness in G
-
enumerator M_normal_gloss = 15¶
-
enumerator M_emission = 16¶
-
enumerator M_occlusion = 17¶
In red channel
-
enumerator M_occlusion_metallic_roughness = 18¶
-
enumerator M_selector = 14¶
-
enumerator M_modulate = 0¶
- TextureStage.__eq__()¶
- TextureStage.__init__()¶
Initialize the texture stage from other
Initialize the texture stage at construction
- TextureStage.__lt__()¶
- TextureStage.__ne__()¶
- TextureStage.assign()¶
- TextureStage.compare_to()¶
Returns a number less than zero if this
TextureStagesorts before the other one, greater than zero if it sorts after, or zero if they are equivalent. The sorting order is arbitrary and largely meaningless, except to differentiate different stages.
- TextureStage.get_alpha_scale()¶
See
set_alpha_scale().
- TextureStage.get_binormal_name()¶
Returns the set of binormals this texture stage will use. This is the same as get_binormal_name(), except that the first part is “binormal”.
- static TextureStage.get_class_type()¶
- TextureStage.get_color()¶
return the color for this stage
- TextureStage.get_combine_alpha_mode()¶
Get combine_alpha_mode
- TextureStage.get_combine_alpha_operand0()¶
Get operand0 of combine_alpha_mode
- TextureStage.get_combine_alpha_operand1()¶
Get operand1 of combine_alpha_mode
- TextureStage.get_combine_alpha_operand2()¶
Get operand2 of combine_alpha_mode
- TextureStage.get_combine_alpha_source0()¶
Get source0 of combine_alpha_mode
- TextureStage.get_combine_alpha_source1()¶
Get source1 of combine_alpha_mode
- TextureStage.get_combine_alpha_source2()¶
Get source2 of combine_alpha_mode
- TextureStage.get_combine_rgb_mode()¶
Get the combine_rgb_mode
- TextureStage.get_combine_rgb_operand0()¶
Get operand0 of combine_rgb_mode
- TextureStage.get_combine_rgb_operand1()¶
Get operand1 of combine_rgb_mode
- TextureStage.get_combine_rgb_operand2()¶
Get operand2 of combine_rgb_mode
- TextureStage.get_combine_rgb_source0()¶
Get source0 of combine_rgb_mode
- TextureStage.get_combine_rgb_source1()¶
Get source1 of combine_rgb_mode
- TextureStage.get_combine_rgb_source2()¶
Get source2 of combine_rgb_mode
- static TextureStage.get_default()¶
Returns the default
TextureStagethat will be used for all texturing that does not name a particular stage. This generally handles the normal single-texture case.
- TextureStage.get_mode()¶
Return the mode of this stage
- TextureStage.get_name()¶
Returns the name of this texture stage
- TextureStage.get_num_combine_alpha_operands()¶
Returns the number of meaningful operands that may be retrieved via get_combine_alpha_sourceN() and get_combine_alpha_operandN().
- TextureStage.get_num_combine_rgb_operands()¶
Returns the number of meaningful operands that may be retrieved via get_combine_rgb_sourceN() and get_combine_rgb_operandN().
- TextureStage.get_priority()¶
Returns the priority associated with this stage.
This is specially helpful for cards that do not support more than n stages of multi-texturing.
- TextureStage.get_rgb_scale()¶
See
set_rgb_scale().
- TextureStage.get_saved_result()¶
Returns the current setting of the saved_result flag. See
set_saved_result().
- TextureStage.get_sort()¶
Returns the sort order of this texture stage.
- TextureStage.get_tangent_name()¶
Returns the set of tangents this texture stage will use. This is the same as
get_texcoord_name(), except that the first part is “tangent”.
- TextureStage.get_tex_view_offset()¶
Returns the current setting of the tex_view_offset. See
set_tex_view_offset().
- TextureStage.get_texcoord_name()¶
See
set_texcoord_name. The default isInternalName::get_texcoord().
- TextureStage.involves_color_scale()¶
Returns true if the
TextureStageis affected by the setting of the currentColorScaleAttrib, false otherwise.
- TextureStage.is_fixed_function()¶
Returns true if the
TextureStageis relevant to the classic fixed function pipeline. This excludes texture stages such as normal mapping and the like.
- TextureStage.output()¶
Just a single line output
- TextureStage.set_alpha_scale()¶
Sets an additional factor that will scale the alpha component after the texture has been applied. This is used only when the mode is CM_combine.
The only legal values are 1, 2, or 4.
- TextureStage.set_color()¶
Set the color for this stage
- TextureStage.set_combine_alpha()¶
Specifies any of the
CombineModevalues that represent a one-parameter operation. Specifically, this is CM_replace only.Specifies any of the
CombineModevalues that represent a two-parameter operation. Specifically, this is everything except for CM_replace and CM_interpolate.Specifies any of the
CombineModevalues that represent a one-parameter operation. Specifically, this is CM_interpolate only.
- TextureStage.set_combine_rgb()¶
Specifies any of the
CombineModevalues that represent a one-parameter operation. Specifically, this is CM_replace only.Specifies any of the
CombineModevalues that represent a two-parameter operation. Specifically, this is everything except for CM_replace and CM_interpolate.Specifies any of the
CombineModevalues that represent a one-parameter operation. Specifically, this is CM_interpolate only.
- TextureStage.set_mode()¶
Set the mode of this texture stage
- TextureStage.set_name()¶
Changes the name of this texture stage
- TextureStage.set_priority()¶
Changes the relative importance of the texture associated with this stage relative to the other texture stages that are applied simultaneously.
This is unrelated to
set_sort(), which controls the order in which multiple textures are applied. The priority number is used to decide which of the requested textures are to be selected for rendering when more textures are requested than the hardware will support. The highest-priority n textures are selected for rendering, and then rendered in order by their sort factor.
- TextureStage.set_rgb_scale()¶
Sets an additional factor that will scale all three r, g, b components after the texture has been applied. This is used only when the mode is CM_combine.
The only legal values are 1, 2, or 4.
- TextureStage.set_saved_result()¶
Sets the saved_result flag. When this is true, the output of this stage will be supplied as the “last_saved_result” source for any future stages, until the next
TextureStagewith a saved_result set true is encountered.This can be used to reuse the results of this texture stage as input to more than one stage later in the pipeline.
The last texture in the pipeline (the one with the highest sort value) should not have this flag set.
- TextureStage.set_sort()¶
Changes the order in which the texture associated with this stage is rendered relative to the other texture stages. When geometry is rendered with multiple textures, the textures are rendered in order from the lowest sort number to the highest sort number.
Also see
set_priority(), which is used to select the most important textures for rendering when some must be omitted because of hardware limitations.
- TextureStage.set_tex_view_offset()¶
Sets the tex_view_offset value. This is used only when a special multiview texture is bound to the
TextureStage, and it selects the particular view of the texture that is to be used.This value is added to the similar parameter on
DisplayRegionto derive the final texture view index that is selected for rendering.
- TextureStage.set_texcoord_name()¶
Indicate which set of UV’s this texture stage will use. Geometry may have any number of associated UV sets, each of which must have a unique name.
Indicate which set of UV’s this texture stage will use. Geometry may have any number of associated UV sets, each of which must have a unique name.
- TextureStage.uses_color()¶
Returns true if the
TextureStagemakes use of whatever color is specified inset_color(), false otherwise.
- TextureStage.uses_last_saved_result()¶
Returns true if the
TextureStagemakes use of the CS_primary_color combine source.
- TextureStage.uses_primary_color()¶
Returns true if the
TextureStagemakes use of the CS_primary_color combine source.
- TextureStage.write()¶
Writes the details of this stage
-
enum CombineMode¶