Name
cgGetNamedStructParameter - get member of a struct parameter by name
Synopsis
#include <Cg/cg.h>
CGparameter cgGetNamedStructParameter( CGparameter param,
const char * name );
Parameters
- param
-
The struct parameter from which to retrieve the member parameter.
- name
-
The name of the member parameter to retrieve.
Return Values
Returns the member parameter from the given struct.
Returns NULL if the struct has no member parameter corresponding to name.
Description
The member parameters of a struct parameter may be retrieved directly
by name using cgGetNamedStructParameter.
The names of the parameters
in a struct may be discovered by iterating through the struct's
member parameters
(see cgGetFirstStructParameter and
cgGetNextParameter), and
calling cgGetParameterName for each one in turn.
Examples
to-be-written
Errors
CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.
CG_INVALID_PARAMETER_TYPE_ERROR is generated if param is not a struct parameter.
History
cgGetNamedStructParameter was introduced in Cg 1.2.
See Also
cgGetFirstStructParameter,
cgGetNextParameter,
cgGetParameterName
|