MeVisLabToolboxReference
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

List of all members.

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

virtual void updateParameter (SoUniformParameterBase *uniformBase, SoState *state)
 Assigns or updates the parameter's value.

Static Public Member Functions

static void initClass ()
 Initialize class with runtime type system.

Public Attributes

SoSFEnum wrapS
 Wrapping mode. Default is REPEAT.
SoSFBool enableBorder
 Enable border to be part of the texture. Default is FALSE.
SoSFVec4f borderColor
 Border color used to for border texture filtering. Only used if 'enableBorder' is FALSE. Default is (0, 0, 0, 0).
SoSFEnum minFilter
 Minification filter mode. Default is LINEAR.
SoSFEnum magFilter
 Magnification filter mode. Default is LINEAR.
SoSFBool use16BitFloat
 Use 16 Bit floating point for the texture format.

Protected Member Functions

virtual ~SoSampler ()
 SoSampler ()
 Constructor.
GLint getInternalFormat (GLenum glDataType)
 Return specialized texture format for GL data type.
const char * getTextureFormatName (GLenum internalFormat)
 Return texture format name.
SbSamplerInfo::TextureType getTextureTypeFromGLFormat (GLenum internalFormat)
void postTextureFormatInfo (GLenum target, GLint format)
 Prints channel depths for given target and format.
void postTextureSizeInfo (GLenum target)
 Prints the size of the bound texture.
virtual void nameChanged (SoSensor *sensor)
 Called when sampler name has changed.
virtual void texConfigChanged (SoSensor *)
 Called when texture configuration (e.g. filter mode) has changed.

Static Protected Member Functions

static void nameChangedCB (void *data, SoSensor *sensor)
static void texConfigChangedCB (void *data, SoSensor *sensor)

Protected Attributes

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

Detailed Description

Abstract Open Inventor base class for sampler nodes.

Definition at line 24 of file SoSampler.h.


Member Enumeration Documentation

Filter methods for minification and magnification.

Enumerator:
NEAREST 
LINEAR 
NEAREST_MIPMAP_NEAREST 
NEAREST_MIPMAP_LINEAR 
LINEAR_MIPMAP_NEAREST 
LINEAR_MIPMAP_LINEAR 

Definition at line 48 of file SoSampler.h.

Texture gen mode.

Enumerator:
NORMAL_MAP 
REFLECTION_MAP 

Definition at line 33 of file SoSampler.h.

Texture wrap type.

Enumerator:
REPEAT 
CLAMP 
CLAMP_TO_EDGE 
CLAMP_TO_BORDER 
MIRRORED_REPEAT 

Definition at line 39 of file SoSampler.h.


Constructor & Destructor Documentation

virtual SoSampler::~SoSampler ( ) [protected, virtual]
SoSampler::SoSampler ( ) [protected]

Constructor.


Member Function Documentation

GLint SoSampler::getInternalFormat ( GLenum  glDataType) [protected]

Return specialized texture format for GL data type.

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

Return texture format name.

SbSamplerInfo::TextureType SoSampler::getTextureTypeFromGLFormat ( GLenum  internalFormat) [protected]
virtual void SoSampler::nameChanged ( SoSensor *  sensor) [protected, virtual]

Called when sampler name has changed.

Reimplemented in SoFramebufferSampler.

static void SoSampler::nameChangedCB ( void *  data,
SoSensor *  sensor 
) [static, protected]
void SoSampler::postTextureFormatInfo ( GLenum  target,
GLint  format 
) [protected]

Prints channel depths for given target and format.

void SoSampler::postTextureSizeInfo ( GLenum  target) [protected]

Prints the size of the bound texture.

virtual void SoSampler::texConfigChanged ( SoSensor *  ) [inline, protected, virtual]

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

Reimplemented in SoMLSampler.

Definition at line 122 of file SoSampler.h.

static void SoSampler::texConfigChangedCB ( void *  data,
SoSensor *  sensor 
) [static, protected]
virtual void SoSampler::updateParameter ( SoUniformParameterBase uniformBase,
SoState *  state 
) [virtual]

Assigns or updates the parameter's value.

Implements SoUniformShaderParameter.

Reimplemented in SoFramebufferSampler2D, SoFramebufferSampler3D, SoImageSampler, SoInheritedFramebufferSampler, and SoMLSampler.


Member Data Documentation

SbBool SoSampler::_hasTextureFloat [protected]

TRUE if GL_xxx_texture_float extension is present.

Definition at line 90 of file SoSampler.h.

SbString SoSampler::_sizeUniformName [protected]

name of the uniform ?_size parameter

Definition at line 93 of file SoSampler.h.

unsigned int SoSampler::_textureComponents [protected]

Definition at line 96 of file SoSampler.h.

GLenum SoSampler::_textureDataType [protected]

Definition at line 98 of file SoSampler.h.

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

Definition at line 64 of file SoSampler.h.

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

Definition at line 61 of file SoSampler.h.

Magnification filter mode. Default is LINEAR.

Definition at line 70 of file SoSampler.h.

Minification filter mode. Default is LINEAR.

Definition at line 67 of file SoSampler.h.

Use 16 Bit floating point for the texture format.

Definition at line 73 of file SoSampler.h.

SoSFEnum SoSampler::wrapS

Wrapping mode. Default is REPEAT.

Definition at line 58 of file SoSampler.h.


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