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 |
Action behavior:
SoGLRenderAction
, SoCallbackAction
Sets the current texture unit and the associated mapping method. Sets: SoTextureUnitElement
See also:
SoBumpMappingProperty, SoTexture2
, SoTexture2Transform
, SoTextureCoordinate2
, SoTextureCoordinateBinding
, SoTextureCoordinateFunction
.
SoNode.RenderModes
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
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, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
getNativeResourceHandle
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 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com