cgGetNextEffect

Langue: en

Version: 46997 (openSuse - 09/10/07)

Section: 3 (Bibliothèques de fonctions)

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

the cgGetFirstEffect manpage