SoTexture Class Reference
[Textures]

Abstract base class for texture mapping nodes. More...

#include <Inventor/nodes/SoTexture.h>

Inheritance diagram for SoTexture:
SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject SoExtTexture2 SoIndexedTexture2 SoTexture2 SoTexture3 SoTextureCubeMap SoUniformGridClipping SoUniformGridProjectionClipping

List of all members.

Public Types

enum  InternalFormat {
  AUTO_INTERNAL_FORMAT,
  ALPHA_FORMAT,
  ALPHA4,
  ALPHA8,
  ALPHA12,
  ALPHA16,
  LUMINANCE_FORMAT,
  LUMINANCE4,
  LUMINANCE8,
  LUMINANCE12,
  LUMINANCE16,
  LUMINANCE_ALPHA,
  LUMINANCE4_ALPHA4,
  LUMINANCE6_ALPHA2,
  LUMINANCE8_ALPHA8,
  LUMINANCE12_ALPHA4,
  LUMINANCE12_ALPHA12,
  LUMINANCE16_ALPHA16,
  INTENSITY_FORMAT,
  INTENSITY4,
  INTENSITY8,
  INTENSITY12,
  INTENSITY16,
  R3_G3_B2,
  RGB_FORMAT,
  RGB4,
  RGB5,
  RGB8,
  RGB10,
  RGB12,
  RGB16,
  RGBA_FORMAT,
  RGBA2,
  RGBA4,
  RGB5_ALPHA1,
  RGBA8,
  RGB10_ALPHA2,
  RGBA12,
  RGBA16,
  RGBA_FLOAT32,
  RGB_FLOAT32,
  ALPHA_FLOAT32,
  INTENSITY_FLOAT32,
  LUMINANCE_FLOAT32,
  LUMINANCE_ALPHA_FLOAT32,
  RGBA_FLOAT16,
  RGB_FLOAT16,
  ALPHA_FLOAT16,
  INTENSITY_FLOAT16,
  LUMINANCE_FLOAT16,
  LUMINANCE_ALPHA_FLOAT16,
  COMPRESSED_ALPHA,
  COMPRESSED_LUMINANCE,
  COMPRESSED_LUMINANCE_ALPHA,
  COMPRESSED_INTENSITY,
  COMPRESSED_RGB,
  COMPRESSED_RGBA,
  COMPRESSED_LUMINANCE_LATC1,
  COMPRESSED_SIGNED_LUMINANCE_LATC1,
  COMPRESSED_LUMINANCE_ALPHA_LATC2,
  COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2,
  COMPRESSED_RED_RGTC1,
  COMPRESSED_SIGNED_RED_RGTC1,
  COMPRESSED_RED_GREEN_RGTC2,
  COMPRESSED_SIGNED_RED_GREEN_RGTC2,
  DEPTH_COMPONENT16,
  DEPTH_COMPONENT24,
  DEPTH24_STENCIL8
}
enum  Model {
  MODULATE = GL_MODULATE,
  DECAL = GL_DECAL,
  BLEND = GL_BLEND,
  REPLACE = GL_REPLACE,
  ADD = GL_ADD,
  COMBINE = GL_COMBINE
}
enum  Wrap {
  REPEAT = GL_REPEAT,
  CLAMP = GL_CLAMP,
  CLAMP_TO_BORDER = GL_CLAMP_TO_BORDER,
  CLAMP_TO_EDGE = GL_CLAMP_TO_EDGE,
  MIRRORED_REPEAT = GL_MIRRORED_REPEAT
}
enum  Filter {
  AUTO = 0,
  NEAREST = GL_NEAREST,
  LINEAR = GL_LINEAR,
  NEAREST_MIPMAP_NEAREST = GL_NEAREST_MIPMAP_NEAREST,
  NEAREST_MIPMAP_LINEAR = GL_NEAREST_MIPMAP_LINEAR,
  LINEAR_MIPMAP_NEAREST = GL_LINEAR_MIPMAP_NEAREST,
  LINEAR_MIPMAP_LINEAR = GL_LINEAR_MIPMAP_LINEAR
}
enum  HW_Feature {
  HW_NPOT = 0,
  HW_FLOATFORMAT,
  HW_DEPTHFORMAT,
  HW_AUTOMIPMAP,
  HW_BORDER_CLAMP,
  HW_EDGE_CLAMP,
  HW_MIRRORED_REPEAT,
  HW_COMPRESSION_S3TC,
  HW_COMPRESSION_LATC,
  HW_COMPRESSION_RGTC
}
enum  FileType {
  UNKNOWN,
  RGB,
  SGI,
  TIFF,
  GIF,
  JPEG,
  BMP,
  PNG,
  JPEG2000,
  PGX,
  PNM,
  RAS,
  DDS,
  HDRI,
  NUM_FILETYPES
}

Public Member Functions

virtual SoType getTypeId () const
void setBitmapFileType (FileType in_type)
FileType getBitmapFileType (void)
virtual void setOverride (const SbBool state)
virtual SbBool isOverride () const

Static Public Member Functions

static SoType getClassTypeId ()
static SbBool isSupported (HW_Feature feature)

Public Attributes

SoSFEnum internalFormat
SoSFBool enableCompressedTexture
SoSFEnum wrapS
SoSFEnum model
SoSFColor blendColor
SoSFBool enableBorder
SoSFVec4f borderColor
SoSFFloat maxAnisotropy
SoSFEnum minFilter
SoSFEnum magFilter

Deprecated



SoDEPRECATED SoSFBool useAutoMipmap

Detailed Description

Abstract base class for texture mapping nodes.

This is the abstract base class for all texture image nodes. It defines the common methods and fields that all texture image nodes have. When a texture image node is encountered during traversal, the associated image and parameters are applied to the current texture unit (see SoTextureUnit) and used to apply the texture to subsequent shapes.

Open Inventor provides multiple texture image nodes optimized for different purposes, including:

Applications may use the isSupported() method to check if the graphics hardware supports a specific texture mapping feature.

FILE FORMAT/DEFAULT

SEE ALSO

SoComplexity, SoExtTexture2, SoIndexedTexture2, SoMaterial, SoTexture2, SoTexture2Transform, SoTexture3, SoTextureCombiner, SoTextureCoordinate2, SoTextureCoordinateBinding, SoTextureCoordinateFunction, SoTextureCubeMap, SoTextureUnit


Member Enumeration Documentation

File Type possible values.

Enumerator:
UNKNOWN 

Unknown file.

RGB 

RGB.

SGI 

SGI.

TIFF 

TIFF.

GIF 

GIF.

JPEG 

JPEG.

BMP 

BMP.

PNG 

PNG.

JPEG2000 

JPEG2000.

PGX 

PGX.

PNM 

PNM.

RAS 

RAS.

DDS 

DDS.

HDRI 

HDRI.

NUM_FILETYPES 

NUM_FILETYPES.

Specifies the OpenGL filtering method for minification and magnification.

AUTO is the default value. In this case Open Inventor automatically selects the filtering method depending on SoComplexity::textureQuality.

Enumerator:
AUTO 

AUTO.

NEAREST 

NEAREST.

LINEAR 

LINEAR.

NEAREST_MIPMAP_NEAREST 

NEAREST_MIPMAP_NEAREST.

NEAREST_MIPMAP_LINEAR 

NEAREST_MIPMAP_LINEAR.

LINEAR_MIPMAP_NEAREST 

LINEAR_MIPMAP_NEAREST.

LINEAR_MIPMAP_LINEAR 

LINEAR_MIPMAP_LINEAR.

Enumerator:
HW_NPOT 

Check support for non-power-of-2 textures.

HW_FLOATFORMAT 

Check support for floating point texture format.

HW_DEPTHFORMAT 

Check support for depth textures.

HW_AUTOMIPMAP 

Check support for automatic mipmap generation.

HW_BORDER_CLAMP 

Check support for texture coordinates border clamp.

HW_EDGE_CLAMP 

Check support for texture coordinates edge clamp.

HW_MIRRORED_REPEAT 

Check support for texture coordinates mirrored repeat.

HW_COMPRESSION_S3TC 

Check support for DDS support (S3TC).

HW_COMPRESSION_LATC 

Check support for texture_compression_latc.

HW_COMPRESSION_RGTC 

Check support for texture_compression_rgtc.

Texture internal storage format.

AUTO_INTERNAL_FORMAT (equivalent to RGB_FORMAT) by default.

Enumerator:
AUTO_INTERNAL_FORMAT 

Default.

ALPHA_FORMAT 

ALPHA_FORMAT.

ALPHA4 

ALPHA4.

Deprecated:

Deprecated since Open Inventor 9610
Use an 8 bit type instead.
ALPHA8 

ALPHA8.

ALPHA12 

ALPHA12.

ALPHA16 

ALPHA16.

LUMINANCE_FORMAT 

LUMINANCE_FORMAT.

LUMINANCE4 

LUMINANCE4.

Deprecated:

Deprecated since Open Inventor 9610
Use an 8 bit type instead.
LUMINANCE8 

LUMINANCE8.

LUMINANCE12 

LUMINANCE12.

LUMINANCE16 

LUMINANCE16.

LUMINANCE_ALPHA 

LUMINANCE_ALPHA.

LUMINANCE4_ALPHA4 

LUMINANCE4_ALPHA4.

LUMINANCE6_ALPHA2 

LUMINANCE6_ALPHA2.

LUMINANCE8_ALPHA8 

LUMINANCE8_ALPHA8.

LUMINANCE12_ALPHA4 

LUMINANCE12_ALPHA4.

LUMINANCE12_ALPHA12 

LUMINANCE12_ALPHA12.

LUMINANCE16_ALPHA16 

LUMINANCE16_ALPHA16.

INTENSITY_FORMAT 

INTENSITY_FORMAT.

INTENSITY4 

INTENSITY4.

Deprecated:

Deprecated since Open Inventor 9610
Use an 8 bit type instead.
INTENSITY8 

INTENSITY8.

INTENSITY12 

INTENSITY12.

INTENSITY16 

INTENSITY16.

R3_G3_B2 

R3_G3_B2.

RGB_FORMAT 

RGB_FORMAT.

RGB4 

RGB4.

RGB5 

RGB5.

RGB8 

RGB8.

RGB10 

RGB10.

RGB12 

RGB12.

RGB16 

RGB16.

RGBA_FORMAT 

RGBA_FORMAT.

RGBA2 

RGBA2.

RGBA4 

RGBA4.

RGB5_ALPHA1 

RGB5_ALPHA1.

RGBA8 

RGBA8.

RGB10_ALPHA2 

RGB10_ALPHA2.

RGBA12 

RGBA12.

RGBA16 

RGBA16.

RGBA_FLOAT32 

RGBA_FLOAT32.

RGB_FLOAT32 

RGB_FLOAT32.

ALPHA_FLOAT32 

ALPHA_FLOAT32.

INTENSITY_FLOAT32 

INTENSITY_FLOAT32.

LUMINANCE_FLOAT32 

LUMINANCE_FLOAT32.

LUMINANCE_ALPHA_FLOAT32 

LUMINANCE_ALPHA_FLOAT32.

RGBA_FLOAT16 

RGBA_FLOAT16.

RGB_FLOAT16 

RGB_FLOAT16.

ALPHA_FLOAT16 

ALPHA_FLOAT16.

INTENSITY_FLOAT16 

INTENSITY_FLOAT16.

LUMINANCE_FLOAT16 

LUMINANCE_FLOAT16.

LUMINANCE_ALPHA_FLOAT16 

LUMINANCE_ALPHA_FLOAT16.

COMPRESSED_ALPHA 

COMPRESSED_ALPHA.

COMPRESSED_LUMINANCE 

COMPRESSED_LUMINANCE.

COMPRESSED_LUMINANCE_ALPHA 

COMPRESSED_LUMINANCE_ALPHA.

COMPRESSED_INTENSITY 

COMPRESSED_INTENSITY.

COMPRESSED_RGB 

COMPRESSED_RGB.

COMPRESSED_RGBA 

COMPRESSED_RGBA.

COMPRESSED_LUMINANCE_LATC1  NOTE: enumeration value available since Open Inventor 7.0

COMPRESSED_SIGNED_LUMINANCE_LATC1  NOTE: enumeration value available since Open Inventor 7.0

COMPRESSED_LUMINANCE_ALPHA_LATC2  NOTE: enumeration value available since Open Inventor 7.0

COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2  NOTE: enumeration value available since Open Inventor 7.0

COMPRESSED_RED_RGTC1  NOTE: enumeration value available since Open Inventor 7.0

COMPRESSED_SIGNED_RED_RGTC1  NOTE: enumeration value available since Open Inventor 7.0

COMPRESSED_RED_GREEN_RGTC2  NOTE: enumeration value available since Open Inventor 7.0

COMPRESSED_SIGNED_RED_GREEN_RGTC2  NOTE: enumeration value available since Open Inventor 7.0

DEPTH_COMPONENT16  NOTE: enumeration value available since Open Inventor 9.0

DEPTH_COMPONENT24  NOTE: enumeration value available since Open Inventor 9.0

DEPTH24_STENCIL8  NOTE: enumeration value available since Open Inventor 9.0

Texture model.

Enumerator:
MODULATE 

The texture color is multiplied by the surface color.

DECAL 

In this mode, OpenGL requires that the specified texture image have either 3 or 4 components.

For a 3-component texture, the texture color replaces the surface color. For a 4-component texture, the texture color is blended with the surface color using the texture alpha value. See OpenGL documentation on glTexEnv for details.

BLEND 

Blends between the surface color and a specified blend color.

REPLACE 

The texture color replaces the surface color.

NOTE: enumeration value available since Open Inventor 4.0

ADD 

Adds incoming fragment and texture source colors.

To use this option, you must be using OpenGL 1.3 or higher, or your board must support the OpenGL GL_ARB_texture_env_add extension. Otherwise, GL_MODULATE is used.

NOTE: enumeration value available since Open Inventor 5.0

COMBINE 

Provides a wide range of programmable combiner functions using the incoming fragment color, texture source color, texture constant color, and the result of the previous texture environment stage as possible parameters.

To use this option, you must be using OpenGL 1.3 or higher, or your board must support the OpenGL GL_ARB_texture_env_combine extension.

NOTE: enumeration value available since Open Inventor 5.0

Texture wrap type.

Enumerator:
REPEAT 

Repeats texture outside 0-1 texture coordinate range.

CLAMP 

Clamps texture coordinates to lie within 0-1 range.

CLAMP_TO_BORDER 

Clamps texture coordinates to a range coinciding with the centers of the border texels of a texture map at each mipmap level.


To use this option, you must be using OpenGL 1.3 or higher, or your board must support the OpenGL GL_ARB_texture_border_clamp extension. Otherwise, GL_CLAMP is used.

NOTE: enumeration value available since Open Inventor 5.0

CLAMP_TO_EDGE 

Clamps texture coordinates to a range coinciding with the centers of the edge texels of a texture map at each mipmap level.


To use this option, you must be using OpenGL 1.2 or higher, or your board must support the OpenGL GL_EXT_texture_edge_clamp or GL_SGIS_texture_edge_clamp extension. Otherwise, GL_CLAMP is used.

NOTE: enumeration value available since Open Inventor 5.0

MIRRORED_REPEAT 

The texture image is repeated in such a way that every odd repetition is a mirror image.


To use this option, you must be using OpenGL 1.4 or higher, or your board must support the OpenGL GL_EXT_texture_mirrored_repeat extension. Otherwise, GL_CLAMP is used.

NOTE: enumeration value available since Open Inventor 5.0


Member Function Documentation

FileType SoTexture::getBitmapFileType ( void   )  [inline]

Gets the texture file format.

static SoType SoTexture::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoNode.

Reimplemented in SoExtTexture2, SoIndexedTexture2, SoTexture2, SoTexture3, SoTextureCubeMap, SoUniformGridClipping, and SoUniformGridProjectionClipping.

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

Returns the type identifier for this specific instance.

Reimplemented from SoNode.

Reimplemented in SoExtTexture2, SoIndexedTexture2, SoTexture2, SoTexture3, SoTextureCubeMap, SoUniformGridClipping, and SoUniformGridProjectionClipping.

virtual SbBool SoTexture::isOverride (  )  const [inline, virtual]

Returns the state of the override field.

Reimplemented from SoNode.

static SbBool SoTexture::isSupported ( HW_Feature  feature  )  [static]

Returns information about hardware support for various texture features.

When using a debug build of Open Inventor, some "no context available" warning messages may be generated. You can ignore them or see SoGLExtension for an example of using SoGLContext to avoid them.

void SoTexture::setBitmapFileType ( FileType  in_type  ) 

Sets the texture file format.

Default is UNKNOWN. If file type is set to UNKNOWN, Open Inventor tries to determine the file type from the file name extension (e.g., foo. gif implies a GIF file). If the set or determined file type is not UNKNOWN, Open Inventor attempts to read the file as that format. If this fails, Open Inventor will try reading the file as each possible format in turn. It is not necessary to set the file type if the image file has the standard file name extension.

virtual void SoTexture::setOverride ( const SbBool  state  )  [inline, virtual]

Set the state of the override field.

see SoNode::setOverride doc.

Reimplemented from SoNode.


Member Data Documentation

Color used for BLEND model.

Defines border color used for border texture filtering.

This value is only used if enableBorder is FALSE.

NOTE: field available since Open Inventor 5.0

Enables borders for textures.

This means that the border is already in the texture.

NOTE: field available since Open Inventor 5.0

Enables storage of textures on the graphics board in compressed form.

The application supplies textures as usual, then OpenGL compresses the textures. This can reduce usage of texture memory significantly, depending on the texture image.

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.

NOTE: field available since Open Inventor 4.0

Internal format for texture storage.

If not available on the graphics device, internalFormat is set back to AUTO_INTERNAL_FORMAT. Use enum 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.

NOTE: field available since Open Inventor 6.0

Specifies the OpenGL magFilter.

Use enum 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.

NOTE: field available since Open Inventor 5.0

Specifies on a per-texture object basis, the maximum degree of anisotropy to account for in texture filtering.

If the specified value is greater than the maximum supported by the graphics board, the value is clamped to GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT.

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.

NOTE: field available since Open Inventor 5.0

Specifies the OpenGL minFilter.

Use enum 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.

NOTE: field available since Open Inventor 5.0

Specifies how to map texture onto surface.

Use enum Model. Default is MODULATE.

Sets OpenGL auto-mipmap generation (if supported).

FALSE by default.

NOTE: field available since Open Inventor 6.0

Deprecated:

Deprecated since Open Inventor 9620
No longer used. mip map are always generated if needed.

Indicates what to do when texture coordinates in the S (horizontal) direction lie outside the range 0-1.

Use enum Wrap. Default is REPEAT.


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

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/