MeVisLab Toolbox Reference
View2DShader Class Referenceabstract

base class for hardware shaders that can be used on a View2DTexture More...

#include <View2DShader.h>

Inheritance diagram for View2DShader:
View2DTextureLUTShader View2DShaderGLSL

Public Member Functions

 View2DShader ()
 
virtual ~View2DShader ()
 
virtual const charname ()=0
 returns the name of the shader
 
virtual void bind (View2DTexture *texture, int tw, int th)=0
 binds/activates the shader, tw and th give the "poweroftwo" size of current subtexture that is rendered
 
virtual void unbind ()=0
 deactivates the shader
 
virtual void getRequiredTextureLayout (View2DTexture *texture, GLuint &format, GLuint &internalFormat, GLuint &transferDataType)
 returns the required texture layout that a GL texture must use, as GL_format enums and datatypes
 
virtual void setLut (View2DLut *newLut)
 sets the lut currently used
 
View2DLutgetLut ()
 gets the lut
 
void invalidateLut ()
 invalidate the lut
 
virtual void bindLutTexture ()
 bind the lut texture to the current texture unit
 
virtual void bindFilterKernelTexture ()
 bind the filter kernel texture
 
virtual float getLutHeightScaleFactor ()
 
virtual SbVec2s getLutTextureSize ()
 

Static Public Member Functions

static void applyTextureFilter (View2DTextureFilter filter)
 set the correct texture filtering on the currently bound texture
 

Protected Attributes

View2DLut_lut
 pointer to the LUT data
 
ml::LUTDataId _lastLutChangeID
 id of last lut
 
int _lastLutSize
 last size of lut
 

Detailed Description

base class for hardware shaders that can be used on a View2DTexture

Definition at line 33 of file View2DShader.h.

Constructor & Destructor Documentation

◆ View2DShader()

View2DShader::View2DShader ( )

◆ ~View2DShader()

virtual View2DShader::~View2DShader ( )
virtual

Member Function Documentation

◆ applyTextureFilter()

static void View2DShader::applyTextureFilter ( View2DTextureFilter filter)
static

set the correct texture filtering on the currently bound texture

◆ bind()

virtual void View2DShader::bind ( View2DTexture * texture,
int tw,
int th )
pure virtual

binds/activates the shader, tw and th give the "poweroftwo" size of current subtexture that is rendered

Implemented in View2DShaderGLSL.

◆ bindFilterKernelTexture()

virtual void View2DShader::bindFilterKernelTexture ( )
inlinevirtual

bind the filter kernel texture

Reimplemented in View2DTextureLUTShader.

Definition at line 64 of file View2DShader.h.

◆ bindLutTexture()

virtual void View2DShader::bindLutTexture ( )
inlinevirtual

bind the lut texture to the current texture unit

Reimplemented in View2DTextureLUTShader.

Definition at line 61 of file View2DShader.h.

◆ getLut()

View2DLut * View2DShader::getLut ( )
inline

gets the lut

Definition at line 55 of file View2DShader.h.

◆ getLutHeightScaleFactor()

virtual float View2DShader::getLutHeightScaleFactor ( )
inlinevirtual

Reimplemented in View2DTextureLUTShader.

Definition at line 69 of file View2DShader.h.

◆ getLutTextureSize()

virtual SbVec2s View2DShader::getLutTextureSize ( )
inlinevirtual

Reimplemented in View2DTextureLUTShader.

Definition at line 71 of file View2DShader.h.

References mlrange_cast().

◆ getRequiredTextureLayout()

virtual void View2DShader::getRequiredTextureLayout ( View2DTexture * texture,
GLuint & format,
GLuint & internalFormat,
GLuint & transferDataType )
virtual

returns the required texture layout that a GL texture must use, as GL_format enums and datatypes

◆ invalidateLut()

void View2DShader::invalidateLut ( )
inline

invalidate the lut

Definition at line 58 of file View2DShader.h.

◆ name()

virtual const char * View2DShader::name ( )
pure virtual

returns the name of the shader

Implemented in View2DShaderGLSL.

◆ setLut()

virtual void View2DShader::setLut ( View2DLut * newLut)
inlinevirtual

sets the lut currently used

Definition at line 52 of file View2DShader.h.

References mlrange_cast().

◆ unbind()

virtual void View2DShader::unbind ( )
pure virtual

deactivates the shader

Implemented in View2DShaderGLSL.

Member Data Documentation

◆ _lastLutChangeID

ml::LUTDataId View2DShader::_lastLutChangeID
protected

id of last lut

Definition at line 79 of file View2DShader.h.

◆ _lastLutSize

int View2DShader::_lastLutSize
protected

last size of lut

Definition at line 82 of file View2DShader.h.

◆ _lut

View2DLut* View2DShader::_lut
protected

pointer to the LUT data

Definition at line 76 of file View2DShader.h.


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