Node that specifies the current texture unit and the associated mapping method. More...
#include <Inventor/nodes/SoTextureUnit.h>
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 |
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:
unit | 0 |
SoBumpMappingProperty, SoTexture2, SoTexture2Transform, SoTextureCoordinate2, SoTextureCoordinateBinding, SoTextureCoordinateFunction.
SoTextureUnit::SoTextureUnit | ( | ) |
Constructor.
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.
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.