Name
cgGetFirstLeafEffectParameter - get the first leaf parameter in an effect
Synopsis
#include <Cg/cg.h>
CGparameter cgGetFirstLeafEffectParameter( CGeffect effect );
Parameters
- effect
-
The effect from which to retrieve the first leaf parameter.
Return Values
Returns the first leaf CGparameter object in effect.
Returns NULL if effect is invalid or if effect does not have any
parameters.
Description
cgGetFirstLeafEffectParameter returns the first leaf parameter in an
effect. The combination of cgGetFirstLeafEffectParameter and
cgGetNextLeafParameter allows the iteration
through all of the parameters of basic data types (not structs or arrays)
without recursion. See cgGetNextLeafParameter for more information.
Examples
CGparameter leaf = cgGetFirstLeafEffectParameter( effect );
while(leaf)
{
/* Do stuff with leaf */
leaf = cgGetNextLeafParameter( leaf );
}
Errors
CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.
History
cgGetFirstLeafEffectParameter was introduced in Cg 1.4.
See Also
cgGetNextLeafParameter,
cgGetFirstLeafParameter
|