MeVisLabToolboxReference
|
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... | |
Public Member Functions | |
View2DShaderGLSL () | |
virtual | ~View2DShaderGLSL () |
virtual void | bind (View2DTexture *texture, int tw, int th) |
binds/activates the shader | |
const char * | name () |
get the shader's name | |
virtual void | unbind () |
deactivates the shader | |
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!) |
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 31 of file View2DShaderGLSL.h.
View2DShaderGLSL::View2DShaderGLSL | ( | ) |
virtual View2DShaderGLSL::~View2DShaderGLSL | ( | ) | [virtual] |
virtual void View2DShaderGLSL::bind | ( | View2DTexture * | texture, |
int | tw, | ||
int | th | ||
) | [virtual] |
binds/activates the shader
Implements View2DShader.
static bool View2DShaderGLSL::mayUseShaders | ( | ) | [static] |
returns if GLSL shaders may be used
const char* View2DShaderGLSL::name | ( | ) | [inline, virtual] |
static bool View2DShaderGLSL::runsInHardware | ( | ) | [static] |
returns if the shader is supported and would run in hardware (calling this method requires a valid GL context!)
virtual void View2DShaderGLSL::unbind | ( | ) | [virtual] |
deactivates the shader
Implements View2DShader.