Name
cgGetParameterResourceName - get a program parameter's resource name
Synopsis
#include <Cg/cg.h> const char * cgGetParameterResourceName( CGparameter param );Parameters
- param
- The program parameter.
Return Values
Returns the resource name of param.
Returns NULL if an error occurs.
Description
cgGetParameterResourceName allows the application to retrieve the resource name for a parameter in a Cg program. For translated profiles this name will most likely be different from the string returned by cgGetResourceString.
Examples
/* log info about parameter param for debugging */ printf("Resource: %s:%d (base %s) [name:%s]\n", cgGetResourceString(cgGetParameterResource(param)), cgGetParameterResourceIndex(param), cgGetResourceString(cgGetParameterBaseResource(param)), cgGetParameterResourceName(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
cgGetParameterResourceName was introduced in Cg 2.1.
See Also
cgGetParameterBaseResource, cgGetParameterResource, cgGetParameterResourceIndex, cgGetResource, cgGetResourceString