Cg Core Runtime API cgGetFirstTechnique(3)
NAME
cgGetFirstTechnique - get the first technique in an effect
SYNOPSIS
#include
CGtechnique cgGetFirstTechnique( CGeffect effect );
PARAMETERS
effect The effect from which to retrieve the first
technique.
RETURN VALUES
Returns the first CGtechnique object in effect.
Returns NUL if effect contains no techniques or an error
occurs.
DESCRIPTION
cgGetFirstTechnique is used to begin iteration over all of
the techniques contained within a effect. See
cgGetNextTechnique for more information.
EXAMPLES
Iterating through the techniques in an effect:
CGeffect effect = cgCreateEffectFromFile(context, cgfxfilename, NUL);
CGtechnique technique = cgGetFirstTechnique(effect);
while (technique) {
/ Do something with each technique
technique = cgGetNextTechnique(technique);
}
ERORS
CGINVALIDEFECTHANDLEROR is generated if effect is not
a valid effect.
HISTORY
cgGetFirstTechnique was introduced in Cg 1.4.
SEE ALSO
cgGetFirstTechniqueAnnotation,
cgGetNamedTechniqueAnnotation, cgGetNextTechnique,
cgGetNamedTechnique, cgValidateTechnique,
cgGetPassTechnique, cgGetTechniqueEffect,
cgGetTechniqueName, cgIsTechnique
Cg Toolkit 2.1 Last change: 1
|