OpenGL Volumizer 2.7 Reference Pages


NAME
vzTMShaderData - Shader data used by the vzTMShader class.

HEADER FILE
#include <Volumizer2/TMShader.h>

PUBLIC MEMBER SUMMARY
vzTMBindParameterCB bindVolumeTextureCB;
vzTMBindParameterCB bindLookupTableCB;
vzAppearance* appearance;
void* userData;

CLASS DESCRIPTION
The vzTMShaderData class is used by the vzTMShader class to provide shader specific information to the application. This information is passed to the various callbacks used by the vzTMShader to describe multi-pass shading techniques. Objects of this class are allocated by each render action being used to render the shape nodes. Along with important information like the current appearance, the object also passes callbacks which can be used by the shader to bind the appropriate 3D texture and lookup tables in the appearance.

MEMBER DESCRIPTIONS

   appearance
vzAppearance* appearance;

The current appearance being used to render the shape node. The appearance contains the shader parameters for the shape node which can be used by the shader to enable different OpenGL state.

   
bindLookupTableCB
vzTMBindParameterCB bindLookupTableCB;

A per-render action callback which can be used by the shader to bind lookup tables in the appearance. The callback takes the parameter name for the lookup table and the vzTMShaderData as arguments and returns true or false depending on success or failure of the callback. The callback is defined as -
typedef bool (*vzTMBindParameterCB)(const char *name, vzTMShaderData *shaderData, vzTMShaderOp operation = VZ_TM_BIND);
The callback can also be used to simply enable or disable the OpenGL state for the lookup table parameter. This is done by specifying the shader operation to be VZ_TM_ENABLE or VZ_TM_DISABLE respectively.

   
bindVolumeTextureCB
vzTMBindParameterCB bindVolumeTextureCB;

A per-render action callback which can be used by the shader to bind volume textures in the appearance. The callback takes the parameter name for the volume texture and the vzTMShaderData as arguments and returns true or false depending on success or failure of the callback. The callback is defined as -
typedef bool (*vzTMBindParameterCB)(const char *name, vzTMShaderData *shaderData, vzTMShaderOp operation = VZ_TM_BIND);
The callback can also be used to simply enable or disable the OpenGL state for the volume texture parameter. This is done by specifying the shader operation to be VZ_TM_ENABLE or VZ_TM_DISABLE respectively.

   
userData
void* userData;

User data pointer for the shader.

Back to Index