TextureStage
from panda3d.core import TextureStage
- class TextureStage
Bases:
TypedWritableReferenceCount
Defines the properties of a named stage of the multitexture pipeline. The TextureAttrib will 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
- CMAdd = 3
- CMAddSigned = 4
- CMDot3Rgb = 7
- CMDot3Rgba = 8
- CMInterpolate = 5
- CMModulate = 2
- CMReplace = 1
- CMSubtract = 6
- CMUndefined = 0
- CM_add = 3
- CM_add_signed = 4
- CM_dot3_rgb = 7
- CM_dot3_rgba = 8
- CM_interpolate = 5
- CM_modulate = 2
- CM_replace = 1
- CM_subtract = 6
- CM_undefined = 0
- COOneMinusSrcAlpha = 4
- COOneMinusSrcColor = 2
- COSrcAlpha = 3
- COSrcColor = 1
- COUndefined = 0
- CO_one_minus_src_alpha = 4
- CO_one_minus_src_color = 2
- CO_src_alpha = 3
- CO_src_color = 1
- CO_undefined = 0
- CSConstant = 2
- CSConstantColorScale = 5
- CSLastSavedResult = 6
- CSPrevious = 4
- CSPrimaryColor = 3
- CSTexture = 1
- CSUndefined = 0
- CS_constant = 2
- CS_constant_color_scale = 5
- CS_last_saved_result = 6
- CS_previous = 4
- CS_primary_color = 3
- CS_texture = 1
- CS_undefined = 0
- MAdd = 4
- MBlend = 2
- MBlendColorScale = 6
- MCombine = 5
- MDecal = 1
- MEmission = 16
- MGloss = 12
- MGlow = 11
- MHeight = 13
- MModulate = 0
- MModulateGloss = 8
- MModulateGlow = 7
- MNormal = 9
- MNormalGloss = 15
- MNormalHeight = 10
- MReplace = 3
- MSelector = 14
- M_add = 4
- M_blend = 2
- M_blend_color_scale = 6
- M_combine = 5
- M_decal = 1
- M_emission = 16
- M_gloss = 12
- M_glow = 11
- M_height = 13
- M_modulate = 0
- M_modulate_gloss = 8
- M_modulate_glow = 7
- M_normal = 9
- M_normal_gloss = 15
- M_normal_height = 10
- M_replace = 3
- M_selector = 14
- __init__(*args, **kwargs)
- alpha_scale
- assign()
C++ Interface: assign(const TextureStage self, const TextureStage copy)
- binormal_name
- color
- compareTo()
C++ Interface: compare_to(TextureStage self, const TextureStage other)
- /**
Returns a number less than zero if this TextureStage sorts 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.
*/
- compare_to()
C++ Interface: compare_to(TextureStage self, const TextureStage other)
- /**
Returns a number less than zero if this TextureStage sorts 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.
*/
- default = TextureStage default
- getBinormalName()
C++ Interface: get_binormal_name(TextureStage self)
- /**
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”.
*/
- getClassType()
C++ Interface: get_class_type()
- getCombineAlphaMode()
C++ Interface: get_combine_alpha_mode(TextureStage self)
- /**
Get combine_alpha_mode
*/
- getCombineAlphaOperand0()
C++ Interface: get_combine_alpha_operand0(TextureStage self)
- /**
Get operand0 of combine_alpha_mode
*/
- getCombineAlphaOperand1()
C++ Interface: get_combine_alpha_operand1(TextureStage self)
- /**
Get operand1 of combine_alpha_mode
*/
- getCombineAlphaOperand2()
C++ Interface: get_combine_alpha_operand2(TextureStage self)
- /**
Get operand2 of combine_alpha_mode
*/
- getCombineAlphaSource0()
C++ Interface: get_combine_alpha_source0(TextureStage self)
- /**
Get source0 of combine_alpha_mode
*/
- getCombineAlphaSource1()
C++ Interface: get_combine_alpha_source1(TextureStage self)
- /**
Get source1 of combine_alpha_mode
*/
- getCombineAlphaSource2()
C++ Interface: get_combine_alpha_source2(TextureStage self)
- /**
Get source2 of combine_alpha_mode
*/
- getCombineRgbMode()
C++ Interface: get_combine_rgb_mode(TextureStage self)
- /**
Get the combine_rgb_mode
*/
- getCombineRgbOperand0()
C++ Interface: get_combine_rgb_operand0(TextureStage self)
- /**
Get operand0 of combine_rgb_mode
*/
- getCombineRgbOperand1()
C++ Interface: get_combine_rgb_operand1(TextureStage self)
- /**
Get operand1 of combine_rgb_mode
*/
- getCombineRgbOperand2()
C++ Interface: get_combine_rgb_operand2(TextureStage self)
- /**
Get operand2 of combine_rgb_mode
*/
- getCombineRgbSource0()
C++ Interface: get_combine_rgb_source0(TextureStage self)
- /**
Get source0 of combine_rgb_mode
*/
- getCombineRgbSource1()
C++ Interface: get_combine_rgb_source1(TextureStage self)
- /**
Get source1 of combine_rgb_mode
*/
- getCombineRgbSource2()
C++ Interface: get_combine_rgb_source2(TextureStage self)
- /**
Get source2 of combine_rgb_mode
*/
- getDefault()
C++ Interface: get_default()
- /**
Returns the default TextureStage that will be used for all texturing that
does not name a particular stage. This generally handles the normal
single-texture case.
*/
- getNumCombineAlphaOperands()
C++ Interface: get_num_combine_alpha_operands(TextureStage self)
- /**
Returns the number of meaningful operands that may be retrieved via
get_combine_alpha_sourceN() and get_combine_alpha_operandN().
*/
- getNumCombineRgbOperands()
C++ Interface: get_num_combine_rgb_operands(TextureStage self)
- /**
Returns the number of meaningful operands that may be retrieved via
get_combine_rgb_sourceN() and get_combine_rgb_operandN().
*/
- getPriority()
C++ Interface: get_priority(TextureStage self)
- /**
Returns the priority associated with this stage.
This is specially helpful for cards that do not support more than n stages
of multi-texturing.
*/
- getSavedResult()
C++ Interface: get_saved_result(TextureStage self)
- /**
Returns the current setting of the saved_result flag. See
set_saved_result().
*/
- getSort()
C++ Interface: get_sort(TextureStage self)
- /**
Returns the sort order of this texture stage.
*/
- getTangentName()
C++ Interface: get_tangent_name(TextureStage self)
- /**
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”.
*/
- getTexViewOffset()
C++ Interface: get_tex_view_offset(TextureStage self)
- /**
Returns the current setting of the tex_view_offset. See
set_tex_view_offset().
*/
- getTexcoordName()
C++ Interface: get_texcoord_name(TextureStage self)
- /**
See set_texcoord_name. The default is InternalName::get_texcoord().
*/
- get_binormal_name()
C++ Interface: get_binormal_name(TextureStage self)
- /**
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”.
*/
- get_class_type()
C++ Interface: get_class_type()
- get_combine_alpha_mode()
C++ Interface: get_combine_alpha_mode(TextureStage self)
- /**
Get combine_alpha_mode
*/
- get_combine_alpha_operand0()
C++ Interface: get_combine_alpha_operand0(TextureStage self)
- /**
Get operand0 of combine_alpha_mode
*/
- get_combine_alpha_operand1()
C++ Interface: get_combine_alpha_operand1(TextureStage self)
- /**
Get operand1 of combine_alpha_mode
*/
- get_combine_alpha_operand2()
C++ Interface: get_combine_alpha_operand2(TextureStage self)
- /**
Get operand2 of combine_alpha_mode
*/
- get_combine_alpha_source0()
C++ Interface: get_combine_alpha_source0(TextureStage self)
- /**
Get source0 of combine_alpha_mode
*/
- get_combine_alpha_source1()
C++ Interface: get_combine_alpha_source1(TextureStage self)
- /**
Get source1 of combine_alpha_mode
*/
- get_combine_alpha_source2()
C++ Interface: get_combine_alpha_source2(TextureStage self)
- /**
Get source2 of combine_alpha_mode
*/
- get_combine_rgb_mode()
C++ Interface: get_combine_rgb_mode(TextureStage self)
- /**
Get the combine_rgb_mode
*/
- get_combine_rgb_operand0()
C++ Interface: get_combine_rgb_operand0(TextureStage self)
- /**
Get operand0 of combine_rgb_mode
*/
- get_combine_rgb_operand1()
C++ Interface: get_combine_rgb_operand1(TextureStage self)
- /**
Get operand1 of combine_rgb_mode
*/
- get_combine_rgb_operand2()
C++ Interface: get_combine_rgb_operand2(TextureStage self)
- /**
Get operand2 of combine_rgb_mode
*/
- get_combine_rgb_source0()
C++ Interface: get_combine_rgb_source0(TextureStage self)
- /**
Get source0 of combine_rgb_mode
*/
- get_combine_rgb_source1()
C++ Interface: get_combine_rgb_source1(TextureStage self)
- /**
Get source1 of combine_rgb_mode
*/
- get_combine_rgb_source2()
C++ Interface: get_combine_rgb_source2(TextureStage self)
- /**
Get source2 of combine_rgb_mode
*/
- get_default()
C++ Interface: get_default()
- /**
Returns the default TextureStage that will be used for all texturing that
does not name a particular stage. This generally handles the normal
single-texture case.
*/
- get_name()
C++ Interface: get_name(TextureStage self)
- /**
Returns the name of this texture stage
*/
- get_num_combine_alpha_operands()
C++ Interface: get_num_combine_alpha_operands(TextureStage self)
- /**
Returns the number of meaningful operands that may be retrieved via
get_combine_alpha_sourceN() and get_combine_alpha_operandN().
*/
- get_num_combine_rgb_operands()
C++ Interface: get_num_combine_rgb_operands(TextureStage self)
- /**
Returns the number of meaningful operands that may be retrieved via
get_combine_rgb_sourceN() and get_combine_rgb_operandN().
*/
- get_priority()
C++ Interface: get_priority(TextureStage self)
- /**
Returns the priority associated with this stage.
This is specially helpful for cards that do not support more than n stages
of multi-texturing.
*/
- get_saved_result()
C++ Interface: get_saved_result(TextureStage self)
- /**
Returns the current setting of the saved_result flag. See
set_saved_result().
*/
- get_sort()
C++ Interface: get_sort(TextureStage self)
- /**
Returns the sort order of this texture stage.
*/
- get_tangent_name()
C++ Interface: get_tangent_name(TextureStage self)
- /**
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”.
*/
- get_tex_view_offset()
C++ Interface: get_tex_view_offset(TextureStage self)
- /**
Returns the current setting of the tex_view_offset. See
set_tex_view_offset().
*/
- get_texcoord_name()
C++ Interface: get_texcoord_name(TextureStage self)
- /**
See set_texcoord_name. The default is InternalName::get_texcoord().
*/
- involvesColorScale()
C++ Interface: involves_color_scale(TextureStage self)
- /**
Returns true if the TextureStage is affected by the setting of the current
ColorScaleAttrib, false otherwise.
*/
- involves_color_scale()
C++ Interface: involves_color_scale(TextureStage self)
- /**
Returns true if the TextureStage is affected by the setting of the current
ColorScaleAttrib, false otherwise.
*/
- isFixedFunction()
C++ Interface: is_fixed_function(TextureStage self)
- /**
Returns true if the TextureStage is relevant to the classic fixed function
pipeline. This excludes texture stages such as normal mapping and the
like.
*/
- is_fixed_function()
C++ Interface: is_fixed_function(TextureStage self)
- /**
Returns true if the TextureStage is relevant to the classic fixed function
pipeline. This excludes texture stages such as normal mapping and the
like.
*/
- mode
- name
- priority
- rgb_scale
- saved_result
- setAlphaScale()
C++ Interface: set_alpha_scale(const TextureStage self, int 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.
*/
- setColor()
C++ Interface: set_color(const TextureStage self, const LVecBase4f color)
- /**
Set the color for this stage
*/
- setCombineAlpha()
C++ Interface: set_combine_alpha(const TextureStage self, int mode, int source0, int operand0) set_combine_alpha(const TextureStage self, int mode, int source0, int operand0, int source1, int operand1) set_combine_alpha(const TextureStage self, int mode, int source0, int operand0, int source1, int operand1, int source2, int operand2)
- /**
Specifies any of the CombineMode values that represent a one-parameter
operation. Specifically, this is CM_replace only.
*/
- /**
Specifies any of the CombineMode values that represent a two-parameter
operation. Specifically, this is everything except for CM_replace and
CM_interpolate.
*/
- /**
Specifies any of the CombineMode values that represent a one-parameter
operation. Specifically, this is CM_interpolate only.
*/
- setCombineRgb()
C++ Interface: set_combine_rgb(const TextureStage self, int mode, int source0, int operand0) set_combine_rgb(const TextureStage self, int mode, int source0, int operand0, int source1, int operand1) set_combine_rgb(const TextureStage self, int mode, int source0, int operand0, int source1, int operand1, int source2, int operand2)
- /**
Specifies any of the CombineMode values that represent a one-parameter
operation. Specifically, this is CM_replace only.
*/
- /**
Specifies any of the CombineMode values that represent a two-parameter
operation. Specifically, this is everything except for CM_replace and
CM_interpolate.
*/
- /**
Specifies any of the CombineMode values that represent a one-parameter
operation. Specifically, this is CM_interpolate only.
*/
- setMode()
C++ Interface: set_mode(const TextureStage self, int mode)
- /**
Set the mode of this texture stage
*/
- setName()
C++ Interface: set_name(const TextureStage self, str name)
- /**
Changes the name of this texture stage
*/
- setPriority()
C++ Interface: set_priority(const TextureStage self, int 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.
*/
- setRgbScale()
C++ Interface: set_rgb_scale(const TextureStage self, int 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.
*/
- setSavedResult()
C++ Interface: set_saved_result(const TextureStage self, bool 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 TextureStage with 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.
*/
- setSort()
C++ Interface: set_sort(const TextureStage self, int 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.
*/
- setTexViewOffset()
C++ Interface: set_tex_view_offset(const TextureStage self, int 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 DisplayRegion to derive the
final texture view index that is selected for rendering.
*/
- setTexcoordName()
C++ Interface: set_texcoord_name(const TextureStage self, InternalName name) set_texcoord_name(const TextureStage self, str 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.
*/
- set_alpha_scale()
C++ Interface: set_alpha_scale(const TextureStage self, int 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.
*/
- set_color()
C++ Interface: set_color(const TextureStage self, const LVecBase4f color)
- /**
Set the color for this stage
*/
- set_combine_alpha()
C++ Interface: set_combine_alpha(const TextureStage self, int mode, int source0, int operand0) set_combine_alpha(const TextureStage self, int mode, int source0, int operand0, int source1, int operand1) set_combine_alpha(const TextureStage self, int mode, int source0, int operand0, int source1, int operand1, int source2, int operand2)
- /**
Specifies any of the CombineMode values that represent a one-parameter
operation. Specifically, this is CM_replace only.
*/
- /**
Specifies any of the CombineMode values that represent a two-parameter
operation. Specifically, this is everything except for CM_replace and
CM_interpolate.
*/
- /**
Specifies any of the CombineMode values that represent a one-parameter
operation. Specifically, this is CM_interpolate only.
*/
- set_combine_rgb()
C++ Interface: set_combine_rgb(const TextureStage self, int mode, int source0, int operand0) set_combine_rgb(const TextureStage self, int mode, int source0, int operand0, int source1, int operand1) set_combine_rgb(const TextureStage self, int mode, int source0, int operand0, int source1, int operand1, int source2, int operand2)
- /**
Specifies any of the CombineMode values that represent a one-parameter
operation. Specifically, this is CM_replace only.
*/
- /**
Specifies any of the CombineMode values that represent a two-parameter
operation. Specifically, this is everything except for CM_replace and
CM_interpolate.
*/
- /**
Specifies any of the CombineMode values that represent a one-parameter
operation. Specifically, this is CM_interpolate only.
*/
- set_mode()
C++ Interface: set_mode(const TextureStage self, int mode)
- /**
Set the mode of this texture stage
*/
- set_name()
C++ Interface: set_name(const TextureStage self, str name)
- /**
Changes the name of this texture stage
*/
- set_priority()
C++ Interface: set_priority(const TextureStage self, int 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.
*/
- set_rgb_scale()
C++ Interface: set_rgb_scale(const TextureStage self, int 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.
*/
- set_saved_result()
C++ Interface: set_saved_result(const TextureStage self, bool 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 TextureStage with 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.
*/
- set_sort()
C++ Interface: set_sort(const TextureStage self, int 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.
*/
- set_tex_view_offset()
C++ Interface: set_tex_view_offset(const TextureStage self, int 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 DisplayRegion to derive the
final texture view index that is selected for rendering.
*/
- set_texcoord_name()
C++ Interface: set_texcoord_name(const TextureStage self, InternalName name) set_texcoord_name(const TextureStage self, str 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.
*/
- sort
- tangent_name
- tex_view_offset
- texcoord_name
- usesColor()
C++ Interface: uses_color(TextureStage self)
- /**
Returns true if the TextureStage makes use of whatever color is specified
in set_color(), false otherwise.
*/
- usesLastSavedResult()
C++ Interface: uses_last_saved_result(TextureStage self)
- /**
Returns true if the TextureStage makes use of the CS_primary_color combine
source.
*/
- usesPrimaryColor()
C++ Interface: uses_primary_color(TextureStage self)
- /**
Returns true if the TextureStage makes use of the CS_primary_color combine
source.
*/
- uses_color()
C++ Interface: uses_color(TextureStage self)
- /**
Returns true if the TextureStage makes use of whatever color is specified
in set_color(), false otherwise.
*/
- uses_last_saved_result()
C++ Interface: uses_last_saved_result(TextureStage self)
- /**
Returns true if the TextureStage makes use of the CS_primary_color combine
source.
*/