13#ifndef SO_IMAGE_SAMPLER_H
14#define SO_IMAGE_SAMPLER_H
76 virtual void setGLTexImage(GLenum target,
const XVImageSize &textureSize, GLint internalFormat, GLint format, GLenum textureDataType,
const GLvoid *textureData) = 0;
#define INVENTOR_SHADER_API
Define class export specifier.
The abstract Inventor class SoImageSampler.
virtual void freeTextureBuffer()
Delete the texture buffer(s).
virtual void setGLTexImage(GLenum target, const XVImageSize &textureSize, GLint internalFormat, GLint format, GLenum textureDataType, const GLvoid *textureData)=0
Set the OpenGL texture.
virtual void generateMipmap()
Generates mipmap.
virtual void imageChanged()=0
Called when the image has changed and is valid.
SbSamplerInfo::TextureType _internTexFormat
Value points to internal texture format.
SbBool _isTextureModified
Indicates changes in the internal texture.
virtual void updateSamplerInfo(SoUniformParameterBase *uniformBase, SoState *state)
Set info about the purpose of the uniform parameter and add info about sampler to state.
XVImageSize _textureSize
size of the internal texture
virtual void updateTextureHandle()
Creates texture handle and binds it.
MLuint8 * _textureBuffer
Buffered texture that is uploaded.
virtual void updateTextureFilteringParameters()
Sets parameters for texture filtering.
ml::GLTexture _textureRes
virtual void updateTextureWrappingParameters()
Sets parameters for texture wrapping in OpenGL.
virtual void uploadDummyTexture(GLenum target)
Upload a dummy texture consisting of one black voxel using setGLTexImage.
GLenum _target
Specifies the target to which the texture is bound.
static void initClass()
Initialize class with runtime type system.
SoImageSampler()
Constructor.
virtual void updateTextureBuffer()
Calls imageChanged() if _textureBuffer is empty.
~SoImageSampler() override
Destructor.
virtual void uploadTextureBuffer()
Uploads data stored in _textureBuffer using setGLTexImage.
void updateParameter(SoUniformParameterBase *uniformBase, SoState *state) override
Assigns or updates the parameter's value.
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.
SoSFMLImage - field interface to ML images and related classes.