SoTextureUnit Class Reference
[Textures]

VSG extension Node that specifies the current texture unit and the associated mapping method. More...

#include <Inventor/nodes/SoTextureUnit.h>

Inheritance diagram for SoTextureUnit:
SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Member Functions

virtual SoType getTypeId () const
 SoTextureUnit ()

Static Public Member Functions

static SoType getClassTypeId ()
static unsigned int getMaxTextureUnit (SoState *state=NULL)

Public Attributes

SoSFUInt32 unit

Detailed Description

VSG extension Node that specifies the current texture unit and the associated mapping method.

This node specifies the current texture unit for all subsequent 2D and 3D texture nodes (for example, SoTexture2, SoTexture2Transform, SoTextureCoordinate2, SoTextureCoordinateBinding, and SoTextureCoordinateFunction).

If the graphics board supports multitexturing (OpenGL 1.5 or GL_ARB_multitexture extension), then multiple textures, each defined by a texture unit, can be applied to the same shape. The maximum number of texture units depends on the board and can be queried using getMaxTextureUnit.

Multitexturing is supported by the following shapes:

Each texture unit is defined by the following texture properties:

Limitations:

FILE FORMAT/DEFAULT

ACTION BEHAVIOR

SEE ALSO

SoBumpMappingProperty, SoTexture2, SoTexture2Transform, SoTextureCoordinate2, SoTextureCoordinateBinding, SoTextureCoordinateFunction.

See related examples:

MultiTexture


Constructor & Destructor Documentation

SoTextureUnit::SoTextureUnit (  ) 

Constructor.


Member Function Documentation

static SoType SoTextureUnit::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoNode.

static unsigned int SoTextureUnit::getMaxTextureUnit ( SoState state = NULL  )  [static]

Returns the maximum number of texture units.

This is the max which can be used when a shader is on state. Without shaders, only the first 4 units (0..3) can be used.

virtual SoType SoTextureUnit::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoNode.


Member Data Documentation

Specifies the texture unit identifier.

Can range from 0 to the largest texture unit, which is getMaxTextureUnit()-1. Values greater than the largest texture unit are clamped at the largest texture unit.


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

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/