MeVisLabToolboxReference
View2DShader Class Reference

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

#include <View2DShader.h>

Inheritance diagram for View2DShader:
View2DTextureLUTShader View2DShaderGLSL

List of all members.

Public Member Functions

 View2DShader ()
virtual ~View2DShader ()
virtual const char * name ()=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 (ml::LUTData< MLuint8 > *newLut)
 sets the lut currently used
ml::LUTData< MLuint8 > * getLut ()
 gets the lut
void invalidateLut ()
 invalidate the lut

Protected Attributes

ml::LUTData< MLuint8 > * _lut
 pointer to the LUT data
MLuint32 _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 34 of file View2DShader.h.


Constructor & Destructor Documentation

View2DShader::View2DShader ( )
virtual View2DShader::~View2DShader ( ) [virtual]

Member Function Documentation

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.

ml::LUTData<MLuint8>* View2DShader::getLut ( ) [inline]

gets the lut

Definition at line 55 of file View2DShader.h.

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

void View2DShader::invalidateLut ( ) [inline]

invalidate the lut

Definition at line 58 of file View2DShader.h.

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

returns the name of the shader

Implemented in View2DShaderGLSL.

virtual void View2DShader::setLut ( ml::LUTData< MLuint8 > *  newLut) [inline, virtual]

sets the lut currently used

Definition at line 52 of file View2DShader.h.

virtual void View2DShader::unbind ( ) [pure virtual]

deactivates the shader

Implemented in View2DShaderGLSL.


Member Data Documentation

id of last lut

Definition at line 66 of file View2DShader.h.

int View2DShader::_lastLutSize [protected]

last size of lut

Definition at line 69 of file View2DShader.h.

pointer to the LUT data

Definition at line 63 of file View2DShader.h.


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