Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoTexture Class Referenceabstract

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

#include <Inventor/nodes/SoTexture.h>

+ Inheritance diagram for SoTexture:

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 ,
  RG8 ,
  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 ,
  R8I ,
  R8UI ,
  R16I ,
  R16UI ,
  R32I ,
  R32UI ,
  RG8I ,
  RG8UI ,
  RG16I ,
  RG16UI ,
  RG32I ,
  RG32UI ,
  RGB8I ,
  RGB8UI ,
  RGB16I ,
  RGB16UI ,
  RGB32I ,
  RGB32UI ,
  RGBA8I ,
  RGBA8UI ,
  RGBA16I ,
  RGBA16UI ,
  RGBA32I ,
  RGBA32UI
}
 Texture internal storage format. More...
 
enum  Model {
  MODULATE = SbEnums::TEX_MODEL_MODULATE ,
  DECAL = SbEnums::TEX_MODEL_DECAL ,
  BLEND = SbEnums::TEX_MODEL_BLEND ,
  REPLACE = SbEnums::TEX_MODEL_REPLACE ,
  ADD = SbEnums::TEX_MODEL_ADD ,
  COMBINE = SbEnums::TEX_MODEL_COMBINE
}
 Texture Combiner Functions. More...
 
enum  Wrap {
  REPEAT = SbEnums::TEX_ADDRESS_REPEAT ,
  CLAMP = SbEnums::TEX_ADDRESS_CLAMP ,
  CLAMP_TO_BORDER = SbEnums::TEX_ADDRESS_CLAMP_BORDER ,
  CLAMP_TO_EDGE = SbEnums::TEX_ADDRESS_CLAMP_TO_EDGE ,
  MIRRORED_REPEAT = SbEnums::TEX_ADDRESS_MIRROR_REPEAT
}
 Texture wrap type. More...
 
enum  Filter {
  AUTO = SbEnums::TEX_FILTER_AUTO ,
  NEAREST = SbEnums::TEX_FILTER_NEAREST ,
  LINEAR = SbEnums::TEX_FILTER_LINEAR ,
  NEAREST_MIPMAP_NEAREST = SbEnums::TEX_FILTER_NEAREST_MIPMAP_NEAREST ,
  NEAREST_MIPMAP_LINEAR = SbEnums::TEX_FILTER_NEAREST_MIPMAP_LINEAR ,
  LINEAR_MIPMAP_NEAREST = SbEnums::TEX_FILTER_LINEAR_MIPMAP_NEAREST ,
  LINEAR_MIPMAP_LINEAR = SbEnums::TEX_FILTER_LINEAR_MIPMAP_LINEAR
}
 Specifies the OpenGL filtering method for minification and magnification. More...
 
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 ,
  DDS ,
  HDRI ,
  NUM_FILETYPES
}
 File Type possible values. More...
 

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
void setBitmapFileType (FileType in_type)
 Sets the texture file format.
 
FileType getBitmapFileType (void)
 Gets the texture file format.
 
virtual void setOverride (const SbBool state)
 Set the state of the override field.
 
virtual SbBool isOverride () const
 Returns the state of the override field.
 
- Public Member Functions inherited from SoNode
virtual SoNodecopy (SbBool copyConnections=FALSE) const
 Creates and returns an exact copy of the node.
 
virtual SbBool affectsState () const
 Returns TRUE if a node has an effect on the state during traversal.
 
virtual void touch ()
 Marks an instance as modified, simulating a change to it.
 
- Public Member Functions inherited from SoFieldContainer
void setToDefaults ()
 Sets all fields in this object to their default values.
 
SbBool hasDefaultValues () const
 Returns TRUE if all of the object's fields have their default values.
 
SbBool fieldsAreEqual (const SoFieldContainer *fc) const
 Returns TRUE if this object's fields are exactly equal to fc's fields.
 
void copyFieldValues (const SoFieldContainer *fc, SbBool copyConnections=FALSE)
 Copies the contents of fc's fields into this object's fields.
 
SoNONUNICODE SbBool set (const char *fieldDataString)
 Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.
 
SbBool set (const SbString &fieldDataString)
 Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.
 
void get (SbString &fieldDataString)
 Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.
 
virtual int getFields (SoFieldList &list) const
 Appends references to all of this object's fields to resultList, and returns the number of fields appended.
 
virtual int getAllFields (SoFieldList &list) const
 Returns a list of fields, including the eventIn's and eventOut's.
 
virtual SoFieldgetField (const SbName &fieldName) const
 Returns a the field of this object whose name is fieldName.
 
virtual SoFieldgetEventIn (const SbName &fieldName) const
 Returns a the eventIn with the given name.
 
virtual SoFieldgetEventOut (const SbName &fieldName) const
 Returns the eventOut with the given name.
 
SbBool getFieldName (const SoField *field, SbName &fieldName) const
 Returns the name of the given field in the fieldName argument.
 
SbBool enableNotify (SbBool flag)
 Notification at this Field Container is enabled (if flag == TRUE) or disabled (if flag == FALSE).
 
SbBool isNotifyEnabled () const
 Notification is the process of telling interested objects that this object has changed.
 
virtual void setUserData (void *data)
 Sets application data.
 
void * getUserData (void) const
 Gets user application data.
 
- Public Member Functions inherited from SoBase
virtual SbName getName () const
 Returns the name of an instance.
 
virtual void setName (const SbName &name)
 Sets the name of an instance.
 
void setSynchronizable (const bool b)
 Sets this to be a ScaleViz synchronizable object.
 
bool isSynchronizable () const
 Gets the ScaleViz synchronizable state of this object.
 
- Public Member Functions inherited from SoRefCounter
void ref () const
 Adds a reference to an instance.
 
void unref () const
 Removes a reference from an instance.
 
void unrefNoDelete () const
 unrefNoDelete() should be called when it is desired to decrement the reference count, but not delete the instance if this brings the reference count to zero.
 
int getRefCount () const
 Returns current reference count.
 
void lock () const
 lock this instance.
 
void unlock () const
 unlock this instance.
 
- Public Member Functions inherited from SoTypedObject
SbBool isOfType (const SoType &type) const
 Returns TRUE if this object is of the type specified in type or is derived from that type.
 
template<typename TypedObjectClass >
SbBool isOfType () const
 Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class.
 

Static Public Member Functions

static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static SbBool isSupported (HW_Feature feature)
 Returns information about hardware support for various texture features.
 
static SbRasterImagereadTexture (const SbString &filename, FileType filetype=UNKNOWN)
 Convenience function that loads the image data from any texture file supported by Open Inventor and returns an SbRasterImage object.
 
- Static Public Member Functions inherited from SoNode
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static SoNodegetByName (const SbName &name)
 A node's name can be set using SoBase::setName().
 
static int getByName (const SbName &name, SoNodeList &list)
 A node's name can be set using SoBase::setName().
 
- Static Public Member Functions inherited from SoFieldContainer
static SoType getClassTypeId ()
 Returns the type of this class.
 
- Static Public Member Functions inherited from SoBase
static SoType getClassTypeId ()
 Returns type identifier for this class.
 
- Static Public Member Functions inherited from SoTypedObject
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Public Attributes

SoSFEnum internalFormat
 Internal format for texture storage.
 
SoSFBool enableCompressedTexture
 Enables storage of textures on the graphics board in compressed form.
 
SoSFEnum wrapS
 Indicates what to do when texture coordinates in the S (horizontal) direction lie outside the range 0-1.
 
SoSFEnum model
 Specifies how to map texture onto surface.
 
SoSFColor blendColor
 Color used for BLEND model.
 
SoSFBool enableBorder
 Enables borders for textures.
 
SoSFVec4f borderColor
 Defines border color used for border texture filtering.
 
SoSFFloat maxAnisotropy
 Specifies on a per-texture object basis, the maximum degree of anisotropy to account for in texture filtering.
 
SoSFEnum minFilter
 Specifies the OpenGL minFilter.
 
SoSFEnum magFilter
 Specifies the OpenGL magFilter.
 

Friends

class inventor::impl::SoExtTexture2Impl
 
class inventor::impl::SoIndexedTexture2Impl
 
class inventor::impl::SoRenderToTexturePropertyImpl
 
struct inventor::renderer::Resource< SoTexture >
 
class inventor::renderer::FixedPipelineShader
 
class inventor::renderer::RendererContext
 

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:

  • SoTexture2
    The basic 2D texture image node. The image may be loaded from a file, loaded from an image in memory or created by rendering a scene graph.
  • SoExtTexture2
    This node is similar to SoTexture2, but has specific optimizations that are valuable for applications that load a large number of textures from files.
  • SoIndexedTexture2
    The first two nodes load an image containing color values that are directly applied to the geometry. This node considers each texel to be a data value that is mapped to a color using the color map defined by an SoColorMap node. This is very useful for "intensity" data sets.
  • SoTextureCubeMap
    This node loads a set of six images representing the faces of a cube. These are "shrink wrapped" onto the geometry similar to environment mapping, but without the need for a single specially warped environment image.
  • SoTexture3
    This node defines a 3D texture map. The image may be loaded from a set of files or loaded directly from memory. A 3D texture may be used to load a volume data set, but note that the Open Inventor VolumeViz nodes are specifically implemented for this purpose (see 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

Definition at line 155 of file SoTexture.h.

Member Enumeration Documentation

◆ FileType

File Type possible values.

Enumerator
UNKNOWN 

Unknown file.

RGB 

RGB.

SGI 

SGI.

TIFF 

TIFF.

GIF 

GIF.

JPEG 

JPEG.

BMP 

BMP.

PNG 

PNG.

JPEG2000 

JPEG2000.

DDS 

DDS.

HDRI 

HDRI.

NUM_FILETYPES 

NUM_FILETYPES.

Definition at line 641 of file SoTexture.h.

◆ Filter

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.

Definition at line 451 of file SoTexture.h.

◆ HW_Feature

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.

Definition at line 472 of file SoTexture.h.

◆ InternalFormat

Texture internal storage format.

AUTO_INTERNAL_FORMAT (equivalent to RGB_FORMAT) by default.

Enumerator
AUTO_INTERNAL_FORMAT 

Default.

ALPHA_FORMAT 

ALPHA_FORMAT.

ALPHA4 

ALPHA4.

ALPHA8 

ALPHA8.

ALPHA12 

ALPHA12.

ALPHA16 

ALPHA16.

LUMINANCE_FORMAT 

LUMINANCE_FORMAT.

LUMINANCE4 

LUMINANCE4.

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.

INTENSITY8 

INTENSITY8.

INTENSITY12 

INTENSITY12.

INTENSITY16 

INTENSITY16.

R3_G3_B2 

R3_G3_B2.

RGB_FORMAT 

RGB_FORMAT.

RGB4 

RGB4.

RGB5 

RGB5.

RG8 

RG8.

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

R8I 

NOTE: enumeration value available since Open Inventor 10.0

R8UI 
R16I 
R16UI 
R32I 
R32UI 
RG8I 
RG8UI 
RG16I 
RG16UI 
RG32I 
RG32UI 
RGB8I 
RGB8UI 
RGB16I 
RGB16UI 
RGB32I 
RGB32UI 
RGBA8I 
RGBA8UI 
RGBA16I 
RGBA16UI 
RGBA32I 
RGBA32UI 

Definition at line 165 of file SoTexture.h.

◆ Model

Texture Combiner Functions.

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.

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.

NOTE: enumeration value available since Open Inventor 5.0

Definition at line 359 of file SoTexture.h.

◆ Wrap

Texture wrap type.

Enumerator
REPEAT 

Repeats texture outside 0-1 texture coordinate range.

CLAMP 

Clamps texture coordinates to lie within 0-1 range.

This wrap type is deprecated in OpenGL core profile. Consider using CLAMP_TO_EDGE instead.

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.


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.


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.


NOTE: enumeration value available since Open Inventor 5.0

Definition at line 407 of file SoTexture.h.

Member Function Documentation

◆ getBitmapFileType()

FileType SoTexture::getBitmapFileType ( void  )

Gets the texture file format.

◆ getClassTypeId()

static SoType SoTexture::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getTypeId()

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.

◆ isOverride()

virtual SbBool SoTexture::isOverride ( ) const
inlinevirtual

Returns the state of the override field.

Reimplemented from SoNode.

Definition at line 704 of file SoTexture.h.

◆ isSupported()

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.

◆ readTexture()

static SbRasterImage * SoTexture::readTexture ( const SbString filename,
FileType  filetype = UNKNOWN 
)
static

Convenience function that loads the image data from any texture file supported by Open Inventor and returns an 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.

◆ setBitmapFileType()

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.

◆ setOverride()

virtual void SoTexture::setOverride ( const SbBool  state)
inlinevirtual

Set the state of the override field.

see SoNode::setOverride doc.

Reimplemented from SoNode.

Definition at line 698 of file SoTexture.h.

Friends And Related Symbol Documentation

◆ inventor::impl::SoExtTexture2Impl

friend class inventor::impl::SoExtTexture2Impl
friend

Definition at line 769 of file SoTexture.h.

◆ inventor::impl::SoIndexedTexture2Impl

friend class inventor::impl::SoIndexedTexture2Impl
friend

Definition at line 770 of file SoTexture.h.

◆ inventor::impl::SoRenderToTexturePropertyImpl

friend class inventor::impl::SoRenderToTexturePropertyImpl
friend

Definition at line 771 of file SoTexture.h.

◆ inventor::renderer::FixedPipelineShader

friend class inventor::renderer::FixedPipelineShader
friend

Definition at line 773 of file SoTexture.h.

◆ inventor::renderer::RendererContext

friend class inventor::renderer::RendererContext
friend

Definition at line 774 of file SoTexture.h.

◆ inventor::renderer::Resource< SoTexture >

friend struct inventor::renderer::Resource< SoTexture >
friend

Definition at line 771 of file SoTexture.h.

Member Data Documentation

◆ blendColor

SoSFColor SoTexture::blendColor

Color used for BLEND model.

Definition at line 570 of file SoTexture.h.

◆ borderColor

SoSFVec4f SoTexture::borderColor

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

Definition at line 586 of file SoTexture.h.

◆ enableBorder

SoSFBool SoTexture::enableBorder

Enables borders for textures.

This means that the border is already in the texture.

NOTE: field available since Open Inventor 5.0

Definition at line 578 of file SoTexture.h.

◆ enableCompressedTexture

SoSFBool SoTexture::enableCompressedTexture

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

Definition at line 552 of file SoTexture.h.

◆ internalFormat

SoSFEnum SoTexture::internalFormat

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

Definition at line 537 of file SoTexture.h.

◆ magFilter

SoSFEnum SoTexture::magFilter

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

Definition at line 638 of file SoTexture.h.

◆ maxAnisotropy

SoSFFloat SoTexture::maxAnisotropy

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

Definition at line 599 of file SoTexture.h.

◆ minFilter

SoSFEnum SoTexture::minFilter

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

Definition at line 617 of file SoTexture.h.

◆ model

SoSFEnum SoTexture::model

Specifies how to map texture onto surface.

Use enum Model. Default is MODULATE.

Definition at line 565 of file SoTexture.h.

◆ wrapS

SoSFEnum SoTexture::wrapS

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

Use enum Wrap. Default is REPEAT.

Definition at line 559 of file SoTexture.h.


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