Enables/disables textures. More...
#include <Inventor/elements/SoTextureEnabledElement.h>
Public Member Functions | |
virtual void | push (SoState *state) |
Overrides push() so we can remember previous element's value and avoid making GL calls if this element has the same value. | |
virtual void | pop (SoState *state, const SoElement *prevTopElement) |
Overrides pop() method so side effects can occur in GL. | |
Public Member Functions inherited from SoReplacedTextureElement | |
virtual void | print (FILE *fp) const |
Prints element (for debugging). | |
Public Member Functions inherited from SoElement | |
virtual SoType | getTypeId () const |
Returns type identifier for element instance. | |
Public Member Functions inherited from SoTypedObject | |
SbBool | isOfType (const SoType &type) const |
Returns TRUE if this object is of the type specified in type or is derived from that type. | |
template<typename TypedObjectClass > | |
SbBool | isOfType () const |
Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class. | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
static int | getClassStackIndex () |
Returns the stack id for this element. | |
static void | set (SoState *state, SbBool value, SoNode *node=NULL) |
Used by GLTextureImageElement, set to TRUE when a non-null image is set, set to FALSE when there is no texture image (the default). | |
static SbBool | get (SoState *state, int unit=0) |
Used by shapes to figure out if they need to send texture coordinates. | |
static SbBool | getDefault () |
By default there is no texture. | |
static void | disableForShapeCache (SoState *state, int unit, bool disable) |
Specify that a texture unit is not used by any shape, so we don't have to invalidate cache when this texture is enable/disable/modified. | |
static bool | isDisabledForShapeCache (SoState *state, int unit) |
Return if that texture unit is not used by any shape, so we don't have to invalidate cache when this texture is enable/disable/modified. | |
Static Public Member Functions inherited from SoReplacedTextureElement | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
static int | getClassStackIndex () |
Returns the stack id for this element. | |
Static Public Member Functions inherited from SoElement | |
static SoType | getClassTypeId () |
Returns type identifier for SoElement class. | |
Static Public Member Functions inherited from SoTypedObject | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Enables/disables textures.
This element enables/disables textures. This is implemented as a separate element from the TextureImageElement so the texture image can be changed without invalidating caches containing shapes – shapes need to know if texturing is going on or not so they can decide to send down texture coordinates or not.
This element is set by the GLTextureImageElement and the GLTextureImageElement, but the interaction between the three elements is a little complicated. Each of the other two elements always sets up the GL texture state appropriately, however, texturing is only enabled if both elements agree that it should be enabled (they check each other's value before calling set).
This element cannot be overridden, but, since the elements that set it check each other's value, overriding those elements has the same effect.
SoTexture2, SoExtTexture2, SoImageBackground, SoTextureCubeMapEnabledElement, SoTexture3EnabledElement
Definition at line 54 of file SoTextureEnabledElement.h.
|
static |
Specify that a texture unit is not used by any shape, so we don't have to invalidate cache when this texture is enable/disable/modified.
Used by shapes to figure out if they need to send texture coordinates.
|
static |
Returns the stack id for this element.
|
static |
Returns the type identifier for this class.
|
inlinestatic |
By default there is no texture.
Definition at line 76 of file SoTextureEnabledElement.h.
|
static |
Return if that texture unit is not used by any shape, so we don't have to invalidate cache when this texture is enable/disable/modified.
|
virtual |
Overrides push() so we can remember previous element's value and avoid making GL calls if this element has the same value.
Reimplemented from SoReplacedTextureElement.
|
static |
Used by GLTextureImageElement, set to TRUE when a non-null image is set, set to FALSE when there is no texture image (the default).