MeVisLab Toolbox Reference
View2DTextureLUTShader Class Reference

abstract base class for shaders that use a 2D texture for LUT lookup More...

#include <View2DShader.h>

Inheritance diagram for View2DTextureLUTShader:
View2DShader View2DShaderGLSL

Public Member Functions

 View2DTextureLUTShader ()
 
 ~View2DTextureLUTShader () override
 
void bindFilterKernelTexture () override
 bind the filter kernel texture
 
void bindLutTexture () override
 bind the lut texture to the current texture unit
 
float getLutHeightScaleFactor () override
 
SbVec2s getLutTextureSize () override
 
- Public Member Functions inherited from View2DShader
 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
 

Protected Member Functions

void createLutTexture ()
 creates a 2D texture from the shader's LUT
 
void updateLutTexture ()
 upload the lut to the texture (texture must be already created)
 
void destroyLutTexture ()
 frees the lut texture
 
void createFilterKernelTexture ()
 create 1d filter kernel texture (using the approach described in section 20.2 of GPU Gems 2)
 
void destroyFilterKernelTexture ()
 destroy the filter kernel
 

Static Protected Member Functions

static GLint desiredLutTextureFormat ()
 

Protected Attributes

ml::GLTexture _lutTexture
 texture that stores the LUT data
 
GLint _lutTextureFormat
 
ml::GLTexture _kernelTexture
 
int _lutTextureWidth
 power-of-two width of lut texture
 
int _lutTextureHeight
 power-of-two height of lut texture
 
int _lutHeight
 number of COMPLETE texture rows used by the LUT (an additional row may be used partly)
 
- Protected Attributes inherited from View2DShader
View2DLut_lut
 pointer to the LUT data
 
ml::LUTDataId _lastLutChangeID
 id of last lut
 
int _lastLutSize
 last size of lut
 

Additional Inherited Members

- Static Public Member Functions inherited from View2DShader
static void applyTextureFilter (View2DTextureFilter filter)
 set the correct texture filtering on the currently bound texture
 

Detailed Description

abstract base class for shaders that use a 2D texture for LUT lookup

Definition at line 87 of file View2DShader.h.

Constructor & Destructor Documentation

◆ View2DTextureLUTShader()

View2DTextureLUTShader::View2DTextureLUTShader ( )

◆ ~View2DTextureLUTShader()

View2DTextureLUTShader::~View2DTextureLUTShader ( )
override

Member Function Documentation

◆ bindFilterKernelTexture()

void View2DTextureLUTShader::bindFilterKernelTexture ( )
overridevirtual

bind the filter kernel texture

Reimplemented from View2DShader.

◆ bindLutTexture()

void View2DTextureLUTShader::bindLutTexture ( )
overridevirtual

bind the lut texture to the current texture unit

Reimplemented from View2DShader.

◆ createFilterKernelTexture()

void View2DTextureLUTShader::createFilterKernelTexture ( )
protected

create 1d filter kernel texture (using the approach described in section 20.2 of GPU Gems 2)

◆ createLutTexture()

void View2DTextureLUTShader::createLutTexture ( )
protected

creates a 2D texture from the shader's LUT

◆ desiredLutTextureFormat()

static GLint View2DTextureLUTShader::desiredLutTextureFormat ( )
staticprotected

◆ destroyFilterKernelTexture()

void View2DTextureLUTShader::destroyFilterKernelTexture ( )
protected

destroy the filter kernel

◆ destroyLutTexture()

void View2DTextureLUTShader::destroyLutTexture ( )
protected

frees the lut texture

◆ getLutHeightScaleFactor()

float View2DTextureLUTShader::getLutHeightScaleFactor ( )
overridevirtual

Reimplemented from View2DShader.

◆ getLutTextureSize()

SbVec2s View2DTextureLUTShader::getLutTextureSize ( )
overridevirtual

Reimplemented from View2DShader.

◆ updateLutTexture()

void View2DTextureLUTShader::updateLutTexture ( )
protected

upload the lut to the texture (texture must be already created)

Member Data Documentation

◆ _kernelTexture

ml::GLTexture View2DTextureLUTShader::_kernelTexture
protected

Definition at line 122 of file View2DShader.h.

◆ _lutHeight

int View2DTextureLUTShader::_lutHeight
protected

number of COMPLETE texture rows used by the LUT (an additional row may be used partly)

Definition at line 129 of file View2DShader.h.

◆ _lutTexture

ml::GLTexture View2DTextureLUTShader::_lutTexture
protected

texture that stores the LUT data

Definition at line 119 of file View2DShader.h.

◆ _lutTextureFormat

GLint View2DTextureLUTShader::_lutTextureFormat
protected

Definition at line 120 of file View2DShader.h.

◆ _lutTextureHeight

int View2DTextureLUTShader::_lutTextureHeight
protected

power-of-two height of lut texture

Definition at line 127 of file View2DShader.h.

◆ _lutTextureWidth

int View2DTextureLUTShader::_lutTextureWidth
protected

power-of-two width of lut texture

Definition at line 125 of file View2DShader.h.


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