MeVisLabToolboxReference
|
Abstract Open Inventor base class for sampler nodes. More...
#include <SoImageSampler.h>
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. | |
Protected Member Functions | |
virtual | ~SoImageSampler () |
SoImageSampler () | |
Constructor. | |
virtual void | freeResources () |
Free resources. Should be called by Destructors of derived classes. | |
virtual void | clearTexturData () |
Delete the texture buffer(s) | |
virtual void | updateTextureHandle () |
Creates texture handle and binds it. | |
virtual void | updateTextureFilteringParameters () |
Sets parameters for texture filtering. | |
virtual void | updateTextureWrappingParameters () |
Sets parameters for texture wrapping in openGL. | |
virtual void | uploadTextureData () |
Uploads data stored in _textureData. | |
virtual void | uploadDummyTextureData (GLenum target) |
Upload a dummy texture consisting of one black voxel. | |
virtual void | generateMipmap () |
Generates mipmap. | |
virtual void | updateSamplerInfo (SoUniformParameterBase *uniformBase, SoState *state) |
Set info about the purpose of the uniform parameter and add info about sampler to state. | |
virtual void | setGlTexImage (GLenum target, XVImageSize textureSize, GLint internalFormat, GLint format, GLenum textureDataType, const GLvoid *textureData) |
Set the openGL texture. | |
virtual void | updateTextureData (bool force=false) |
Calls imageChanged() if _textureData is empty or if force is true. | |
virtual void | imageChanged ()=0 |
Called when the image has changed and is valid. | |
Protected Attributes | |
GLuint | _textureId |
MLuint8 * | _textureData |
Buffered texture that is uploaded. | |
SbBool | _isTextureModified |
Indicates changes in the internal texture. | |
SbSamplerInfo::TextureType | _internTexFormat |
Value points to internal texture format. | |
XVImageSize | _textureSize |
size of the internal texture | |
GLenum | _target |
Specifies the target to which the texture is bound. | |
SoUniformParameterBase::SamplerType | _samplerType |
Specifies the sampler type. Must be either SAMPLER_1D, SAMPLER_2D, SAMPLER_3D or SAMPLER_CUBEMAP. |
Abstract Open Inventor base class for sampler nodes.
Definition at line 29 of file SoImageSampler.h.
virtual SoImageSampler::~SoImageSampler | ( | ) | [protected, virtual] |
SoImageSampler::SoImageSampler | ( | ) | [protected] |
Constructor.
virtual void SoImageSampler::clearTexturData | ( | ) | [protected, virtual] |
Delete the texture buffer(s)
Reimplemented in SoMLSamplerCubeMap.
virtual void SoImageSampler::freeResources | ( | ) | [protected, virtual] |
Free resources. Should be called by Destructors of derived classes.
virtual void SoImageSampler::generateMipmap | ( | ) | [protected, virtual] |
Generates mipmap.
virtual void SoImageSampler::imageChanged | ( | ) | [protected, pure virtual] |
Called when the image has changed and is valid.
Implemented in SoMLSampler.
static void SoImageSampler::initClass | ( | ) | [static] |
Initialize class with runtime type system.
Reimplemented from SoSampler.
Reimplemented in SoMLSampler, SoMLSampler1D, SoMLSampler2D, SoMLSampler3D, and SoMLSamplerCubeMap.
virtual void SoImageSampler::setGlTexImage | ( | GLenum | target, |
XVImageSize | textureSize, | ||
GLint | internalFormat, | ||
GLint | format, | ||
GLenum | textureDataType, | ||
const GLvoid * | textureData | ||
) | [protected, virtual] |
Set the openGL texture.
Reimplemented in SoMLSampler2D, SoMLSampler3D, and SoMLSamplerCubeMap.
virtual void SoImageSampler::updateParameter | ( | SoUniformParameterBase * | uniformBase, |
SoState * | state | ||
) | [virtual] |
Assigns or updates the parameter's value.
Reimplemented from SoSampler.
Reimplemented in SoMLSampler.
virtual void SoImageSampler::updateSamplerInfo | ( | SoUniformParameterBase * | uniformBase, |
SoState * | state | ||
) | [protected, virtual] |
Set info about the purpose of the uniform parameter and add info about sampler to state.
virtual void SoImageSampler::updateTextureData | ( | bool | force = false | ) | [protected, virtual] |
Calls imageChanged() if _textureData is empty or if force is true.
Reimplemented in SoMLSamplerCubeMap.
virtual void SoImageSampler::updateTextureFilteringParameters | ( | ) | [protected, virtual] |
Sets parameters for texture filtering.
virtual void SoImageSampler::updateTextureHandle | ( | ) | [protected, virtual] |
Creates texture handle and binds it.
virtual void SoImageSampler::updateTextureWrappingParameters | ( | ) | [protected, virtual] |
Sets parameters for texture wrapping in openGL.
Implemented for s dimension Derived classes should add wrapping for additional dimensions
Reimplemented in SoMLSampler2D, and SoMLSampler3D.
virtual void SoImageSampler::uploadDummyTextureData | ( | GLenum | target | ) | [protected, virtual] |
Upload a dummy texture consisting of one black voxel.
virtual void SoImageSampler::uploadTextureData | ( | ) | [protected, virtual] |
Uploads data stored in _textureData.
Reimplemented in SoMLSamplerCubeMap.
Value points to internal texture format.
Reimplemented in SoMLSampler.
Definition at line 105 of file SoImageSampler.h.
SbBool SoImageSampler::_isTextureModified [protected] |
Indicates changes in the internal texture.
Definition at line 102 of file SoImageSampler.h.
Specifies the sampler type. Must be either SAMPLER_1D, SAMPLER_2D, SAMPLER_3D or SAMPLER_CUBEMAP.
Definition at line 117 of file SoImageSampler.h.
GLenum SoImageSampler::_target [protected] |
Specifies the target to which the texture is bound.
Must be set by the derived class! Must be one of GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_2D_ARRAY, GL_TEXTURE_RECTANGLE, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_BUFFER, GL_TEXTURE_2D_MULTISAMPLE or GL_TEXTURE_2D_MULTISAMPLE_ARRAY.
Definition at line 114 of file SoImageSampler.h.
MLuint8* SoImageSampler::_textureData [protected] |
Buffered texture that is uploaded.
Definition at line 99 of file SoImageSampler.h.
GLuint SoImageSampler::_textureId [protected] |
Definition at line 94 of file SoImageSampler.h.
XVImageSize SoImageSampler::_textureSize [protected] |
size of the internal texture
Definition at line 108 of file SoImageSampler.h.