Name
cgGetParameterResource - get a program parameter's resource
Synopsis
#include <Cg/cg.h>
CGresource cgGetParameterResource( CGparameter param );
Parameters
- param
-
The program parameter.
Return Values
Returns the resource of param.
Description
cgGetParameterResource allows the application to
retrieve
the resource for a parameter in a Cg program. This resource is
necessary for the application to be able to supply the program's
inputs and use the program's outputs.
The resource enumerant is a profile-specific hardware resource.
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
cgGetParameterResource was introduced in Cg 1.1.
See Also
cgGetParameterResourceIndex,
cgGetParameterBaseResource,
cgGetResourceString
|