GetAttributeList


Description

Enables a shader to tell Softimage which attribute it needs in order to perform rendering. The attributes are returned in a CHardwareAttributeArray.

The CHardwareAttribute class implements a set of helper functions to enable shaders to request any type of data on the mesh or point cloud to be used in rendering. Each attribute is defined by a CHardwareAttribute object allows access to the attribute data and the hardware registers that will hold the data. Each shader must export this callback which notifies Softimage which attributes the shader needs.


Applies To

Custom Realtime Shaders


Syntax

bool <shader_name>_<renderer_name>_GetAttributeList (
        CRef                            in_pCtx, 
        CHardwareAttributeArray&    out_array, 
        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_GetAttributeList, whereas the version parsed from a .cgfx file will use Sunset_CgFx_GetAttributeList.


Parameters

Parameter Type Description
in_pCtx CRef& A reference to the HardwareShaderContext object.
out_array CHardwareAttributeArray List of CHardwareAttributes defined on this shader
io_pInstanceData void A pointer to the shader instance user data

See Also