public abstract class SoTexture extends SoNode
SoTextureUnit
) and used to apply the texture to subsequent shapes.
Open Inventor provides multiple texture image nodes optimized for different purposes, including:
SoTexture2
SoExtTexture2
SoTexture2
, but has specific optimizations that are valuable for applications that load a large number of textures from files.
SoIndexedTexture2
SoColorMap
node. This is very useful for "intensity" data sets.
SoTextureCubeMap
SoTexture3
SoVolumeData
).
Applications may use the isSupported()
method to check if the graphics hardware supports a specific texture mapping feature.
File format/default:
This is an abstract class. See the reference page of a derived class for the format and default values.
See also:
SoComplexity
, SoExtTexture2
, SoIndexedTexture2
, SoMaterial
, SoTexture2
, SoTexture2Transform
, SoTexture3
, SoTextureCombiner
, SoTextureCoordinate2
, SoTextureCoordinateBinding
, SoTextureCoordinateFunction
, SoTextureCubeMap
, SoTextureUnit
Modifier and Type | Class and Description |
---|---|
static class |
SoTexture.FileTypes
File Type possible values.
|
static class |
SoTexture.Filters
Specifies the OpenGL filtering method for minification and magnification.
|
static class |
SoTexture.HW_Features |
static class |
SoTexture.InternalFormats
Texture internal storage format.
|
static class |
SoTexture.Models
Texture Combiner Functions.
|
static class |
SoTexture.WrapType
Texture wrap type.
|
SoNode.RenderModes
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFColor |
blendColor
Color used for BLEND model.
|
SoSFVec4f |
borderColor
Defines border color used for border texture filtering.
|
SoSFBool |
enableBorder
Enables borders for textures.
|
SoSFBool |
enableCompressedTexture
Enables storage of textures on the graphics board in compressed form.
|
SoSFEnum<SoTexture.InternalFormats> |
internalFormat
Internal format for texture storage.
|
SoSFEnum<SoTexture.Filters> |
magFilter
Specifies the OpenGL magFilter.
|
SoSFFloat |
maxAnisotropy
Specifies on a per-texture object basis, the maximum degree of anisotropy to account for in texture filtering.
|
SoSFEnum<SoTexture.Filters> |
minFilter
Specifies the OpenGL minFilter.
|
SoSFEnum<SoTexture.Models> |
model
Specifies how to map texture onto surface.
|
SoSFEnum<SoTexture.WrapType> |
wrapS
Indicates what to do when texture coordinates in the S (horizontal) direction lie outside the range 0-1.
|
VERBOSE_LEVEL, ZeroHandle
Modifier and Type | Method and Description |
---|---|
SoTexture.FileTypes |
getBitmapFileType()
Gets the texture file format.
|
static boolean |
isSupported(SoTexture.HW_Features feature)
Returns information about hardware support for various texture features.
|
static SbRasterImage |
readTexture(java.lang.String filename)
Calls readTexture(filename, SoTexture.FileTypes.valueOf( SoTexture.FileTypes.UNKNOWN.getValue() )).
|
static SbRasterImage |
readTexture(java.lang.String filename,
SoTexture.FileTypes filetype)
Convenience function that loads the image data from any texture file supported by Open Inventor and returns an
SbRasterImage object. |
void |
setBitmapFileType(SoTexture.FileTypes in_type)
Sets the texture file format.
|
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 SoSFEnum<SoTexture.InternalFormats> internalFormat
InternalFormat
. Default is AUTO_INTERNAL_FORMAT. If internal format is set to AUTO_INTERNAL_FORMAT texture precision could only be 16-bit maximum. To go beyond this limitation, you must set the internal format to the needed value.
public final SoSFBool enableCompressedTexture
To use this option, you must be using OpenGL 1.3 or higher, or your board must support the OpenGL GL_ARB_texture_compression extension.
public final SoSFEnum<SoTexture.WrapType> wrapS
Wrap
. Default is REPEAT.public final SoSFEnum<SoTexture.Models> model
Model
. Default is MODULATE.public final SoSFColor blendColor
public final SoSFBool enableBorder
public final SoSFVec4f borderColor
enableBorder
is false.
public final SoSFFloat maxAnisotropy
To use this option, you must be using OpenGL 1.1 or higher, or your board must support the OpenGL GL_EXT_filter_anisotropic extension.
public final SoSFEnum<SoTexture.Filters> minFilter
Filter
. Default is AUTO. The minification filter is used when the rendered size of the geometry is smaller than the texture image to be applied (typically far away objects). Effectively controls whether the GPU will select the "nearest" texel in the texture image or do linear interpolation (smoothing) or even interpolate between mipmap levels (subsampled versions of the base image). Using NEAREST may allow better performance, but the LINEAR options produce much higher quality rendering.
The default value (AUTO) means that the minification filter setting is actually controlled by the SoComplexity.textureQuality
field.
public final SoSFEnum<SoTexture.Filters> magFilter
Filter
. Default is AUTO. Only the following Filter values are valid: AUTO, NEAREST, and LINEAR.
The magnification filter is used when the rendered size of the geometry is larger than the texture image to be applied (typically near objects). Effectively controls whether the GPU will select the "nearest" texel in the texture image or do linear interpolation (smoothing). Using NEAREST may allow better performance, but the LINEAR options produce much higher quality rendering.
Only the values NEAREST and LINEAR are valid in this field (see OpenGL specification).
The default value (AUTO) means that the magnification filter setting is actually controlled by the SoComplexity.textureQuality
field.
public static SbRasterImage readTexture(java.lang.String filename)
public void setBitmapFileType(SoTexture.FileTypes in_type)
public SoTexture.FileTypes getBitmapFileType()
public static SbRasterImage readTexture(java.lang.String filename, SoTexture.FileTypes filetype)
SbRasterImage
object.
Returns null if the load fails for any reason.
If the file type is known, you may specify it using the FileType
enum and Open Inventor will use the corresponding image reader. If filetype is UNKNOWN, Open Inventor will try to automatically determine which image reader should be used for the given file.
public static boolean isSupported(SoTexture.HW_Features feature)
SoGLExtension
for an example of using SoGLContext
to avoid them.Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com