Indicates the set of TextureStages and their associated Textures that should be applied to (or removed from) a node. More...
Public Member Functions | |
RenderAttrib const | addOffStage (TextureStage stage, int override) |
Returns a new TextureAttrib, just like this one, but with the indicated stage added to the list of stages turned off by this attrib. | |
RenderAttrib const | addOffStage (TextureStage stage) |
Returns a new TextureAttrib, just like this one, but with the indicated stage added to the list of stages turned off by this attrib. | |
RenderAttrib const | addOnStage (TextureStage stage, Texture tex, int override) |
Returns a new TextureAttrib, just like this one, but with the indicated stage added to the list of stages turned on by this attrib. | |
RenderAttrib const | addOnStage (TextureStage stage, Texture tex) |
Returns a new TextureAttrib, just like this one, but with the indicated stage added to the list of stages turned on by this attrib. | |
int | findOnStage (TextureStage const stage) |
Returns the index number of the indicated TextureStage within the list of on_stages, or -1 if the indicated stage is not listed. | |
int | getFfTcIndex (int n) |
For each TextureStage listed in get_on_ff_stage(), this returns a unique index number for the texture coordinate name used by that TextureStage. | |
int | getNumOffStages () |
Returns the number of stages that are turned off by the attribute. | |
int | getNumOnFfStages () |
Returns the number of on-stages that are relevant to the classic fixed function pipeline. | |
int | getNumOnStages () |
Returns the number of stages that are turned on by the attribute. | |
TextureStage | getOffStage (int n) |
Returns the nth stage turned off by the attribute, sorted in arbitrary (pointer) order. | |
list | getOffStages () |
TextureStage | getOnFfStage (int n) |
Returns the nth stage turned on by the attribute, sorted in render order, including only those relevant to the classic fixed function pipeline. | |
list | getOnFfStages () |
TextureStage | getOnStage (int n) |
Returns the nth stage turned on by the attribute, sorted in render order. | |
int | getOnStageOverride (TextureStage stage) |
Returns the override value associated with the indicated stage. | |
list | getOnStages () |
Texture | getOnTexture (TextureStage stage) |
Returns the texture associated with the indicated stage, or NULL if no texture is associated. | |
Texture | getTexture () |
If the TextureAttrib is not an 'off' TextureAttrib, returns the base-level texture that is associated. | |
bool | hasAllOff () |
Returns true if this attrib turns off all stages (although it may also turn some on). | |
bool | hasOffStage (TextureStage stage) |
Returns true if the indicated stage is turned off by the attrib, false otherwise. | |
bool | hasOnStage (TextureStage stage) |
Returns true if the indicated stage is turned on by the attrib, false otherwise. | |
bool | isIdentity () |
Returns true if this is an identity attrib: it does not change the set of stages in use. | |
bool | isOff () |
Returns true if the TextureAttrib is an 'off' TextureAttrib, indicating that it should disable texturing. | |
RenderAttrib const | removeOffStage (TextureStage stage) |
Returns a new TextureAttrib, just like this one, but with the indicated stage removed from the list of stages turned off by this attrib. | |
RenderAttrib const | removeOnStage (TextureStage stage) |
Returns a new TextureAttrib, just like this one, but with the indicated stage removed from the list of stages turned on by this attrib. | |
RenderAttrib const | unifyTextureStages (TextureStage stage) |
Returns a new TextureAttrib, just like this one, but with any included TextureAttribs that happen to have the same name as the given object replaced with the object. | |
Static Public Member Functions | |
static int | getClassSlot () |
static TypeHandle | getClassType () |
static RenderAttrib const | make () |
Constructs a new TextureAttrib object that does nothing. | |
static RenderAttrib const | make (Texture tex) |
Constructs a new TextureAttrib object suitable for rendering the indicated texture onto geometry, using the default TextureStage. | |
static RenderAttrib const | makeAllOff () |
Constructs a new TextureAttrib object that turns off all stages (and hence disables texturing). | |
static RenderAttrib const | makeDefault () |
Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be. | |
static RenderAttrib const | makeOff () |
Constructs a new TextureAttrib object suitable for rendering untextured geometry. |
Indicates the set of TextureStages and their associated Textures that should be applied to (or removed from) a node.
RenderAttrib const addOffStage | ( | TextureStage | stage, |
int | override | ||
) |
Returns a new TextureAttrib, just like this one, but with the indicated stage added to the list of stages turned off by this attrib.
RenderAttrib const addOffStage | ( | TextureStage | stage | ) |
Returns a new TextureAttrib, just like this one, but with the indicated stage added to the list of stages turned off by this attrib.
RenderAttrib const addOnStage | ( | TextureStage | stage, |
Texture | tex, | ||
int | override | ||
) |
Returns a new TextureAttrib, just like this one, but with the indicated stage added to the list of stages turned on by this attrib.
RenderAttrib const addOnStage | ( | TextureStage | stage, |
Texture | tex | ||
) |
Returns a new TextureAttrib, just like this one, but with the indicated stage added to the list of stages turned on by this attrib.
int findOnStage | ( | TextureStage const | stage | ) |
Returns the index number of the indicated TextureStage within the list of on_stages, or -1 if the indicated stage is not listed.
static int getClassSlot | ( | ) | [static] |
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from RenderAttrib.
int getFfTcIndex | ( | int | n | ) |
For each TextureStage listed in get_on_ff_stage(), this returns a unique index number for the texture coordinate name used by that TextureStage.
It is guaranteed to remain the same index number for each texcoord name (for a given set of TextureStages), even if the texture render order changes.
int getNumOffStages | ( | ) |
Returns the number of stages that are turned off by the attribute.
int getNumOnFfStages | ( | ) |
Returns the number of on-stages that are relevant to the classic fixed function pipeline.
This excludes texture stages such as normal maps.
int getNumOnStages | ( | ) |
Returns the number of stages that are turned on by the attribute.
TextureStage getOffStage | ( | int | n | ) |
Returns the nth stage turned off by the attribute, sorted in arbitrary (pointer) order.
list getOffStages | ( | ) |
TextureStage getOnFfStage | ( | int | n | ) |
Returns the nth stage turned on by the attribute, sorted in render order, including only those relevant to the classic fixed function pipeline.
This excludes texture stages such as normal maps.
list getOnFfStages | ( | ) |
TextureStage getOnStage | ( | int | n | ) |
Returns the nth stage turned on by the attribute, sorted in render order.
int getOnStageOverride | ( | TextureStage | stage | ) |
Returns the override value associated with the indicated stage.
list getOnStages | ( | ) |
Texture getOnTexture | ( | TextureStage | stage | ) |
Returns the texture associated with the indicated stage, or NULL if no texture is associated.
Texture getTexture | ( | ) |
If the TextureAttrib is not an 'off' TextureAttrib, returns the base-level texture that is associated.
Otherwise, return NULL.
bool hasAllOff | ( | ) |
Returns true if this attrib turns off all stages (although it may also turn some on).
bool hasOffStage | ( | TextureStage | stage | ) |
Returns true if the indicated stage is turned off by the attrib, false otherwise.
bool hasOnStage | ( | TextureStage | stage | ) |
Returns true if the indicated stage is turned on by the attrib, false otherwise.
bool isIdentity | ( | ) |
Returns true if this is an identity attrib: it does not change the set of stages in use.
bool isOff | ( | ) |
Returns true if the TextureAttrib is an 'off' TextureAttrib, indicating that it should disable texturing.
If multitexture is in effect, a TextureAttrib may not be strictly "on" or "off"; therefore, to get a more precise answer to this question, you should consider using has_all_off() or get_num_off_stages() or has_off_stage() instead.
static RenderAttrib const make | ( | ) | [static] |
Constructs a new TextureAttrib object that does nothing.
static RenderAttrib const make | ( | Texture | tex | ) | [static] |
Constructs a new TextureAttrib object suitable for rendering the indicated texture onto geometry, using the default TextureStage.
static RenderAttrib const makeAllOff | ( | ) | [static] |
Constructs a new TextureAttrib object that turns off all stages (and hence disables texturing).
static RenderAttrib const makeDefault | ( | ) | [static] |
Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.
static RenderAttrib const makeOff | ( | ) | [static] |
Constructs a new TextureAttrib object suitable for rendering untextured geometry.
RenderAttrib const removeOffStage | ( | TextureStage | stage | ) |
Returns a new TextureAttrib, just like this one, but with the indicated stage removed from the list of stages turned off by this attrib.
RenderAttrib const removeOnStage | ( | TextureStage | stage | ) |
Returns a new TextureAttrib, just like this one, but with the indicated stage removed from the list of stages turned on by this attrib.
RenderAttrib const unifyTextureStages | ( | TextureStage | stage | ) |
Returns a new TextureAttrib, just like this one, but with any included TextureAttribs that happen to have the same name as the given object replaced with the object.