MeVisLab Toolbox Reference
|
specialized shader that uses GLSL to implement a (up-to) 16 bit Hardware Lut More...
#include <View2DShaderGLSL.h>
Classes | |
struct | Shader |
Stores a full shader program for the given configuration. More... | |
struct | ShaderConfig |
Stores a shader configuration. More... | |
Static Public Member Functions | |
static bool | mayUseShaders () |
returns if GLSL shaders may be used | |
static bool | runsInHardware () |
returns if the shader is supported and would run in hardware (calling this method requires a valid GL context!) | |
Static Public Member Functions inherited from View2DShader | |
static void | applyTextureFilter (View2DTextureFilter filter) |
set the correct texture filtering on the currently bound texture | |
Additional Inherited Members | |
Protected Member Functions inherited from View2DTextureLUTShader | |
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 inherited from View2DTextureLUTShader | |
static GLint | desiredLutTextureFormat () |
Protected Attributes inherited from View2DTextureLUTShader | |
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 | |
specialized shader that uses GLSL to implement a (up-to) 16 bit Hardware Lut
The RGBA LookupTable is loaded into a 2D texture of 256 pixels width and dynamic height. The texture lookups and color interpolation is done with two "assembly" fragment programs, one for bilinear interpolation and one for nearest neigbor interpolation. The shader interacts with the View2DTexture
and it's bind message is called by each subtexture that the View2DTexture renders. This is done because the size of the textures changes and this size is needed as local parameters in the fragment program.
Definition at line 32 of file View2DShaderGLSL.h.
View2DShaderGLSL::View2DShaderGLSL | ( | ) |
|
override |
|
overridevirtual |
binds/activates the shader
Implements View2DShader.
get the shader's name
Implements View2DShader.
returns if the shader is supported and would run in hardware (calling this method requires a valid GL context!)
|
overridevirtual |
deactivates the shader
Implements View2DShader.