Term (Realtime Shaders)
 
 
 

Term (Realtime Shaders)


Description

The Term callback enables the shader to clean up after itself (for example, shader instance data).


Applies To

Custom Realtime Shaders


Syntax

bool <shader_name>_<renderer_name>_Term (
        CRef    in_pCtx, 
        void    **io_pInstanceData
)
{ 
        ... 
}

<shader_name> is the class name registered for this shader, with any spaces converted to underscores. In the case of a shader definition plug-in, the name is specified in the call to PluginRegistrar::RegisterShader. In the case of a shader definition created with a parser, the name is set in the ParseInfo callback via the ClassName attribute.

<renderer_name> is the name of the rendering engine. For example, an OpenGL shader with a class name of Sunset will use Sunset_OpenGL_Term, whereas the version parsed from a .cgfx file will use Sunset_CgFx_Term.


Parameters

Parameter Type Description
in_pCtx CRef& A reference to the HardwareShaderContext object.
io_pInstanceData void A pointer to the shader instance user data

See Also