MeVisLab Toolbox Reference
SoSampler Class Reference

Abstract Open Inventor base class for sampler nodes. More...

#include <SoSampler.h>

Inheritance diagram for SoSampler:
SoUniformShaderParameter SoShaderParameter SoFramebufferSampler SoImageSampler SoSampler2D SoFramebufferSampler2D SoFramebufferSampler3D SoMLSampler SoInheritedFramebufferSampler SoMultiPassFramebufferSampler SoMLSampler1D SoMLSampler2D SoMLSampler3D SoMLSamplerCubeMap

Public Types

enum  TexGenMode { NORMAL_MAP = GL_NORMAL_MAP_EXT , REFLECTION_MAP = GL_REFLECTION_MAP_EXT }
 Texture gen mode. More...
 
enum  Wrap {
  REPEAT = GL_REPEAT , CLAMP = GL_CLAMP , CLAMP_TO_EDGE = GL_CLAMP_TO_EDGE , CLAMP_TO_BORDER = GL_CLAMP_TO_BORDER ,
  MIRRORED_REPEAT = GL_MIRRORED_REPEAT
}
 Texture wrap type. More...
 
enum  Filter {
  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
}
 Filter methods for minification and magnification. More...
 

Public Member Functions

void updateParameter (SoUniformParameterBase *uniformBase, SoState *state) override
 Assigns or updates the parameter's value. More...
 
- Public Member Functions inherited from SoUniformShaderParameter
void GLRender (SoGLRenderAction *action) override
 Add this node to element in state. More...
 
virtual void updatePreparation (SoState *)
 Hook for internal preparation steps. More...
 
- Public Member Functions inherited from SoShaderParameter
void callback (SoCallbackAction *) override
 Shut down handling of these actions for children. More...
 
void GLRender (SoGLRenderAction *) override
 
void getBoundingBox (SoGetBoundingBoxAction *) override
 
void getMatrix (SoGetMatrixAction *) override
 
void handleEvent (SoHandleEventAction *) override
 
void pick (SoPickAction *) override
 

Static Public Member Functions

static void initClass ()
 Initialize class with runtime type system. More...
 
- Static Public Member Functions inherited from SoUniformShaderParameter
static void initClass ()
 Initialize class with runtime type system. More...
 
- Static Public Member Functions inherited from SoShaderParameter
static void initClass ()
 Initialize class with runtime type system. More...
 

Public Attributes

SoSFEnum wrapS
 Wrapping mode. Default is REPEAT. More...
 
SoSFBool enableBorder
 Enable border to be part of the texture. Default is FALSE. More...
 
SoSFVec4f borderColor
 Border color used to for border texture filtering. Only used if 'enableBorder' is FALSE. Default is (0, 0, 0, 0). More...
 
SoSFEnum minFilter
 Minification filter mode. Default is LINEAR. More...
 
SoSFEnum magFilter
 Magnification filter mode. Default is LINEAR. More...
 
SoSFBool use16BitFloat
 Use 16 Bit floating point for the texture format. More...
 
SoSFBool needsTextureCoordinates
 Enable this if the sampler needs the standard inventor texture coordinates. More...
 
- Public Attributes inherited from SoUniformShaderParameter
std::set< SbString > auxUniformParameters
 Auxiliary uniform shader parameters which are maintained by this node. More...
 
- Public Attributes inherited from SoShaderParameter
SoSFString name
 Name given to parameter in high level languages. More...
 

Protected Member Functions

 ~SoSampler () override
 
 SoSampler ()
 Constructor. More...
 
GLint getInternalFormat (GLenum glDataType)
 Return specialized texture format for GL data type. More...
 
const char * getTextureFormatName (GLenum internalFormat)
 Return texture format name. More...
 
SbSamplerInfo::TextureType getTextureTypeFromGLFormat (GLenum internalFormat)
 
void postTextureFormatInfo (GLenum target, GLint format)
 Prints channel depths for given target and format. More...
 
void postTextureSizeInfo (GLenum target)
 Prints the size of the bound texture. More...
 
virtual void nameChanged (SoField *field)
 Called when sampler name has changed. More...
 
virtual void texConfigChanged (SoField *)
 Called when texture configuration (e.g. filter mode) has changed. More...
 
- Protected Member Functions inherited from SoUniformShaderParameter
 SoUniformShaderParameter ()
 Constructor. More...
 
- Protected Member Functions inherited from SoShaderParameter
 SoShaderParameter ()
 Constructor. More...
 

Protected Attributes

SbBool _hasTextureFloat
 TRUE if GL_xxx_texture_float extension is present. More...
 
SbString _sizeUniformName
 name of the uniform ?_size parameter More...
 
unsigned int _textureComponents
 
GLenum _textureDataType
 

Detailed Description

Abstract Open Inventor base class for sampler nodes.

Abstract Open Inventor base class for sampler nodes.

Definition at line 29 of file SoSampler.h.

Member Enumeration Documentation

◆ Filter

Filter methods for minification and magnification.

Enumerator
NEAREST 
LINEAR 
NEAREST_MIPMAP_NEAREST 
NEAREST_MIPMAP_LINEAR 
LINEAR_MIPMAP_NEAREST 
LINEAR_MIPMAP_LINEAR 

Definition at line 53 of file SoSampler.h.

◆ TexGenMode

Texture gen mode.

Enumerator
NORMAL_MAP 
REFLECTION_MAP 

Definition at line 38 of file SoSampler.h.

◆ Wrap

Texture wrap type.

Enumerator
REPEAT 
CLAMP 
CLAMP_TO_EDGE 
CLAMP_TO_BORDER 
MIRRORED_REPEAT 

Definition at line 44 of file SoSampler.h.

Constructor & Destructor Documentation

◆ ~SoSampler()

SoSampler::~SoSampler ( )
overrideprotected

◆ SoSampler()

SoSampler::SoSampler ( )
protected

Constructor.

Member Function Documentation

◆ getInternalFormat()

GLint SoSampler::getInternalFormat ( GLenum  glDataType)
protected

Return specialized texture format for GL data type.

◆ getTextureFormatName()

const char* SoSampler::getTextureFormatName ( GLenum  internalFormat)
protected

Return texture format name.

◆ getTextureTypeFromGLFormat()

SbSamplerInfo::TextureType SoSampler::getTextureTypeFromGLFormat ( GLenum  internalFormat)
protected

◆ initClass()

static void SoSampler::initClass ( )
static

Initialize class with runtime type system.

◆ nameChanged()

virtual void SoSampler::nameChanged ( SoField *  field)
protectedvirtual

Called when sampler name has changed.

Reimplemented in SoFramebufferSampler.

◆ postTextureFormatInfo()

void SoSampler::postTextureFormatInfo ( GLenum  target,
GLint  format 
)
protected

Prints channel depths for given target and format.

◆ postTextureSizeInfo()

void SoSampler::postTextureSizeInfo ( GLenum  target)
protected

Prints the size of the bound texture.

◆ texConfigChanged()

virtual void SoSampler::texConfigChanged ( SoField *  )
inlineprotectedvirtual

Called when texture configuration (e.g. filter mode) has changed.

Reimplemented in SoMLSampler.

Definition at line 129 of file SoSampler.h.

◆ updateParameter()

void SoSampler::updateParameter ( SoUniformParameterBase uniformBase,
SoState *  state 
)
overridevirtual

Assigns or updates the parameter's value.

Implements SoUniformShaderParameter.

Member Data Documentation

◆ _hasTextureFloat

SbBool SoSampler::_hasTextureFloat
protected

TRUE if GL_xxx_texture_float extension is present.

Definition at line 98 of file SoSampler.h.

◆ _sizeUniformName

SbString SoSampler::_sizeUniformName
protected

name of the uniform ?_size parameter

Definition at line 101 of file SoSampler.h.

◆ _textureComponents

unsigned int SoSampler::_textureComponents
protected

Definition at line 104 of file SoSampler.h.

◆ _textureDataType

GLenum SoSampler::_textureDataType
protected

Definition at line 106 of file SoSampler.h.

◆ borderColor

SoSFVec4f SoSampler::borderColor

Border color used to for border texture filtering. Only used if 'enableBorder' is FALSE. Default is (0, 0, 0, 0).

Definition at line 69 of file SoSampler.h.

◆ enableBorder

SoSFBool SoSampler::enableBorder

Enable border to be part of the texture. Default is FALSE.

Definition at line 66 of file SoSampler.h.

◆ magFilter

SoSFEnum SoSampler::magFilter

Magnification filter mode. Default is LINEAR.

Definition at line 75 of file SoSampler.h.

◆ minFilter

SoSFEnum SoSampler::minFilter

Minification filter mode. Default is LINEAR.

Definition at line 72 of file SoSampler.h.

◆ needsTextureCoordinates

SoSFBool SoSampler::needsTextureCoordinates

Enable this if the sampler needs the standard inventor texture coordinates.

Definition at line 81 of file SoSampler.h.

◆ use16BitFloat

SoSFBool SoSampler::use16BitFloat

Use 16 Bit floating point for the texture format.

Definition at line 78 of file SoSampler.h.

◆ wrapS

SoSFEnum SoSampler::wrapS

Wrapping mode. Default is REPEAT.

Definition at line 63 of file SoSampler.h.


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