> ## Name

> cgGetNextEffect - iterate through effects in a context

> ## Synopsis

>     #include <Cg/cg.h>

>     CGeffect cgGetNextEffect( CGeffect effect );

> ## Parameters

> effect
>   The current effect.

> ## Return Values

> Returns the next effect in the context's internal sequence of effects.

> Returns NULL when effect is the last effect in the context.

> ## Description

> The effects within a context can be iterated over with cgGetNextEffect.

> Note that no specific order of traversal is defined by this mechanism. The only guarantee is that each effect will be visited exactly once. No guarantees can be made if effects are created or deleted during iteration.

> ## Examples

>     CGeffect effect = cgGetFirstEffect( context );
>     while( effect )
>     {
>       /* do something with effect */
>       effect = cgGetNextEffect( effect );
>     }

> ## Errors

> CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.

> ## History

> cgGetNextEffect was introduced in Cg 1.4.

> ## See Also

> cgGetFirstEffect