Cg Core Runtime API cgGetParameterResourceIndex(3)
NAME
cgGetParameterResourceIndex - get a program parameter's
resource index
SYNOPSIS
#include
unsigned long cgGetParameterResourceIndex( CGparameter param );
PARAMETERS
param The program parameter.
RETURN VALUES
Returns the resource index of param.
Returns 0000 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)));
ERORS
CGINVALIDPARAMHANDLEROR is generated if param is not a
valid parameter.
CGINVALIDPARAMETEREROR is generated if param is not a
leaf node.
HISTORY
cgGetParameterResourceIndex was introduced in Cg 1.1.
SEE ALSO
cgGetParameterResource, cgGetResource, cgGetResourceString
Cg Toolkit 2.1 Last change: 1
|