Open Inventor Reference
|
Element that enables/disables textures. More...
#include <Inventor/elements/SoGLTextureEnabledElement.h>
Public Member Functions | |
virtual void | init (SoState *state) |
Initializes element. | |
virtual void | push (SoState *state) |
Override push() so we can remember previous elements value and avoid making GL calls if this element has the same value. | |
virtual void | pop (SoState *state, const SoElement *prevTopElement) |
Override pop() method so side effects can occur in GL. | |
virtual void | setElt (int32_t value) |
Override base class set to make GL calls. | |
virtual | ~SoGLTextureEnabledElement () |
Static Public Member Functions | |
static void | set (SoState *state, SbBool value) |
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 void | set (SoState *state, SoNode *, SbBool value) |
static SbBool | get (SoState *state) |
Used by shapes to figure out if they need to send texture coordinates: | |
static SbBool | getDefault () |
By default there is not texture. | |
static void | initClass () |
Initializes the SoGLTextureEnabledElement class. |
This is implemented as a separate element from the TextureImageElement so the texture image can be changed without blowing 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 is set by the GLTextureImageElement and the GLTextureImageElement; the interaction between the three 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.
Definition at line 84 of file SoGLTextureEnabledElement.h.
virtual SoGLTextureEnabledElement::~SoGLTextureEnabledElement | ( | ) | [virtual] |
Definition at line 105 of file SoGLTextureEnabledElement.h.
References SoInt32Element::get().
static SbBool SoGLTextureEnabledElement::getDefault | ( | ) | [inline, static] |
Definition at line 109 of file SoGLTextureEnabledElement.h.
References FALSE.
virtual void SoGLTextureEnabledElement::init | ( | SoState * | state | ) | [virtual] |
Reimplemented from SoElement.
static void SoGLTextureEnabledElement::initClass | ( | ) | [static] |
Reimplemented from SoInt32Element.
virtual void SoGLTextureEnabledElement::pop | ( | SoState * | state, |
const SoElement * | prevTopElement | ||
) | [virtual] |
Reimplemented from SoElement.
virtual void SoGLTextureEnabledElement::push | ( | SoState * | state | ) | [virtual] |
Reimplemented from SoElement.
static void SoGLTextureEnabledElement::set | ( | SoState * | state, |
SoNode * | , | ||
SbBool | value | ||
) | [inline, static] |
Definition at line 99 of file SoGLTextureEnabledElement.h.
virtual void SoGLTextureEnabledElement::setElt | ( | int32_t | value | ) | [virtual] |
Reimplemented from SoInt32Element.