> # NAME

> cgGetFirstEffect - get the first effect in a context

> # SYNOPSIS

>       #include <Cg/cg.h>

>       CGeffect cgGetFirstEffect( CGcontext context );

> # PARAMETERS

> context

>   The context from which to retrieve the first effect.

> # RETURN VALUES

> Returns the first CGeffect object in context.

> Returns NULL if context contains no effects.

> # DESCRIPTION

> cgGetFirstEffect is used to begin iteration over all of the effects contained by a context. See cgGetNextEffect for more information.

> # EXAMPLES

>       /* one or more effects have previously been loaded into context */
>       CGeffect effect = cgGetFirstEffect( context );

> # ERRORS

> CG_INVALID_CONTEXT_HANDLE_ERROR is generated if context is not a valid context.

> # HISTORY

> cgGetFirstEffect was introduced in Cg 1.4.

> # SEE ALSO

> cgGetNextEffect, cgCreateEffect, cgCreateEffectFromFile, cgDestroyEffect, cgIsEffect, cgGetFirstProgram