public class SoTextureUnit extends SoNode
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:
SoCone
SoCube
SoCylinder
SoFaceSet
SoIndexedFaceSet
SoIndexedQuadMesh
SoIndexedTriangleStripSet
SoQuadMesh
SoSphere
SoTriangleStripSet
Each texture unit is defined by the following texture properties:
SoTexture)
SoTextureCoordinate2, SoTextureCoordinate3, SoTextureCoordinateBinding, etc.)
SoTextureCoordinateFunction)
SoTexture2Transform, SoTexture3Transform, SoMatrixTransform, etc.)
Limitations:
SoShapeHints.UNKNOWN_FACE_TYPE).
SoTextureCoordinateFunction) is not possible for the bump mapping method.
SoVertexShaderParameter to specify texture coordinates to be used by the shader(s). SoVertexShaderParameter parameter sets are limited to 32 on OpenGL3 hardware.
File format/default:
TextureUnit {
| unit | 0 |
| mappingMethod | IMAGE_MAPPING |
Action behavior:
SoGLRenderAction, SoCallbackAction
Sets the current texture unit and the associated mapping method. Sets: SoTextureUnitElement
See also:
SoBumpMappingProperty, SoTexture2, SoTexture2Transform, SoTextureCoordinate2, SoTextureCoordinateBinding, SoTextureCoordinateFunction.
| Modifier and Type | Class and Description |
|---|---|
static class |
SoTextureUnit.MappingMethods
Deprecated.
|
Inventor.ConstructorCommand| Modifier and Type | Field and Description |
|---|---|
static int |
BUMP_MAPPING
Deprecated.
Use
SoTextureUnit.MappingMethods.BUMP_MAPPING instead. |
static int |
IMAGE_MAPPING
Deprecated.
Use
SoTextureUnit.MappingMethods.IMAGE_MAPPING instead. |
SoSFEnum<SoTextureUnit.MappingMethods> |
mappingMethod
Deprecated.
As of Open Inventor 10000 See documentation for more details
|
SoSFUInt32 |
unit
Specifies the texture unit identifier.
|
VERBOSE_LEVEL, ZeroHandle| Constructor and Description |
|---|
SoTextureUnit()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
getMaxTextureUnit()
Calls getMaxTextureUnit((com.openinventor.inventor.misc.SoState)null).
|
static int |
getMaxTextureUnit(SoState state)
Returns the maximum number of texture units.
|
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, writecopyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaultsdispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizablegetAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads@Deprecated public static final int BUMP_MAPPING
SoTextureUnit.MappingMethods.BUMP_MAPPING instead.@Deprecated public static final int IMAGE_MAPPING
SoTextureUnit.MappingMethods.IMAGE_MAPPING instead.@Deprecated public final SoSFEnum<SoTextureUnit.MappingMethods> mappingMethod
MappingMethod. Default is IMAGE_MAPPING.Deprecated since Open Inventor 10000 public final SoSFUInt32 unit
getMaxTextureUnit()-1. Values greater than the largest texture unit are clamped at the largest texture unit.public static int getMaxTextureUnit()
public static int getMaxTextureUnit(SoState state)
Generated on July 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com