The Vish Visualization Shell 0.3
Vish
Static Public Member Functions | List of all members
Wizt::GLColormap Struct Reference

A colormap can be used in two ways: as 1D texture, or as colortable. More...

#include <ocean/GLvish/VGLColormap.hpp>

Static Public Member Functions

static void Disable (const RefPtr< Colormap > &Cmap)
 Disable this colormap, i.e.
 
static bool Enable (const RefPtr< Colormap > &Cmap, const RefPtr< GLTexture1D > &CmapTexture, const bool clampP, bool Discrete)
 Enable this colormap, as 1D texture or as colortable.
 
static RefPtr< GLTexture1DEnable (const RefPtr< Colormap > &Cmap, TextureCreator &CmapTC, int TextureUnit, const bool clampP=true, bool Discrete=false)
 Activate a 1D texture from the virtual color values and put these into the specified texture creator.
 
static bool EnableColorTable (const RefPtr< Colormap > &Cmap)
 Explicitly load the colormap as OpenGL ColorTable.
 

Detailed Description

A colormap can be used in two ways: as 1D texture, or as colortable.

Which method to use depends on the usage scenario:

Member Function Documentation

◆ Disable()

void Wizt::GLColormap::Disable ( const RefPtr< Colormap > &  Cmap)
static

Disable this colormap, i.e.

switch off Colortable mode.

Referenced by Enable().

◆ Enable() [1/2]

bool Wizt::GLColormap::Enable ( const RefPtr< Colormap > &  Cmap,
const RefPtr< GLTexture1D > &  CmapTexture,
const bool  clampP,
bool  Discrete 
)
static

Enable this colormap, as 1D texture or as colortable.

Parameters
Cmap1DIf a valid pointer, set the colormap as 1D texture, otherwise as a colortable.
clampPclamp values, not repeating
DiscreteA flag to tell if the colormap shall be interpolated or not.
Note
If the colormap is set via a colortable, then the PixelTransfer() may be applied elsewhere. It affects subsequent operations of loading a texture. Binding an existing texture will however not be affected by the colormap then, it is required to reload the texture.

References Disable(), and Eagle::FixedArray< value, N >::ptr().

Referenced by Enable().

◆ Enable() [2/2]

RefPtr< GLTexture1D > Wizt::GLColormap::Enable ( const RefPtr< Colormap > &  Cmap,
TextureCreator CmapTC,
int  TextureUnit,
const bool  clampP = true,
bool  Discrete = false 
)
static

Activate a 1D texture from the virtual color values and put these into the specified texture creator.

Parameters
CmapTCThe Texture creator, as retrieved from an OpenGL Cache
TextureUnitThe Texture unit (OpenGL ActiveTexture) which is to be used for this texture.
clampPclamp values, not repeating

References Enable(), Wizt::TextureCreator::get(), and MemCore::ReferenceBase< Object >::self().