SoTexture3EnabledElement Class Reference
[Elements]

VSG extension Enables/disables 3D textures. More...

#include <Inventor/elements/SoTexture3EnabledElement.h>

Inheritance diagram for SoTexture3EnabledElement:
SoReplacedTextureElement SoElement SoTypedObject

List of all members.

Public Member Functions

virtual void push (SoState *state)
virtual void pop (SoState *state, const SoElement *prevTopElement)

Static Public Member Functions

static SoType getClassTypeId ()
static int getClassStackIndex ()
static void set (SoState *state, SbBool value, SoNode *node=NULL)
static SbBool get (SoState *state, int unit=0)
static SbBool getDefault ()
static void disableForShapeCache (SoState *state, int unit, bool disable)
static bool isDisabledForShapeCache (SoState *state, int unit)

Detailed Description

VSG extension Enables/disables 3D textures.

This element enables/disables 3D textures. This is implemented as a separate element from the TextureImage3Element 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 GLTextureImage3Element and the GLTextureEnabledElement. 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.

SEE ALSO

SoTexture3


Member Function Documentation

static void SoTexture3EnabledElement::disableForShapeCache ( SoState state,
int  unit,
bool  disable 
) [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.

static SbBool SoTexture3EnabledElement::get ( SoState state,
int  unit = 0 
) [static]

Used by shapes to figure out if they need to send texture coordinates.

static int SoTexture3EnabledElement::getClassStackIndex (  )  [static]

Returns the stack id for this element.

Reimplemented from SoReplacedTextureElement.

static SoType SoTexture3EnabledElement::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoReplacedTextureElement.

static SbBool SoTexture3EnabledElement::getDefault (  )  [inline, static]

By default there is not texture.

static bool SoTexture3EnabledElement::isDisabledForShapeCache ( SoState state,
int  unit 
) [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 void SoTexture3EnabledElement::pop ( SoState state,
const SoElement prevTopElement 
) [virtual]

Overrides pop() method so side effects can occur in GL.

virtual void SoTexture3EnabledElement::push ( SoState state  )  [virtual]

Overrides push() so we can remember previous elements value and avoid making GL calls if this element has the same value.

Reimplemented from SoReplacedTextureElement.

static void SoTexture3EnabledElement::set ( SoState state,
SbBool  value,
SoNode node = NULL 
) [static]

Used by Texture3ImageElement, set to TRUE when a non-null image is set, set to FALSE when there is no 3D texture image (the default).


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 16 Sep 2021
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/