> ## Name

> cgGetParameterResourceIndex - get a program parameter's resource index

> ## Synopsis

>     #include <Cg/cg.h>

>     unsigned long cgGetParameterResourceIndex( CGparameter param );

> ## Parameters

> param
>   The program parameter.

> ## Return Values

> Returns the resource index of param.

> Returns 0 if an error occurs.

> ## Description

> cgGetParameterResourceIndex allows the application to retrieve the resource index for a parameter in a Cg program. This index value is only used with resources that are linearly addressable.

> ## Examples

>     /* log info about parameter param for debugging */

>     printf("Resource: %s:%d (base %s)\n",
>       cgGetResourceString(cgGetParameterResource(param)),
>       cgGetParameterResourceIndex(param),
>       cgGetResourceString(cgGetParameterBaseResource(param)));

> ## Errors

> CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.

> CG_INVALID_PARAMETER_ERROR is generated if param is not a leaf node.

> ## History

> cgGetParameterResourceIndex was introduced in Cg 1.1.

> ## See Also

> cgGetParameterResource, cgGetResource, cgGetResourceString