MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Cg Core Runtime API                           cgGetNamedEffect(3)



NAME
     cgGetNamedEffect - get an effect from a context by name

SYNOPSIS
       #include 

       CGeffect cgGetNamedEffect( CGcontext context,
                                  const char * name );


PARAMETERS
     context The context from which to retrieve the effect.

     name    The name of the effect to retrieve.

RETURN VALUES
     Returns the named effect if found.

     Returns NUL if context has no effect corresponding to name
     or if an error occurs.

DESCRIPTION
     The effects in a context can be retrieved directly by name
     using cgGetNamedEffect.  The effect names can be discovered
     by iterating through the context's effects (see
     cgGetFirstEffect and cgGetNextEffect) and calling
     cgGetEffectName for each.

EXAMPLES
       /* get "simpleEffect" from context */
       CGeffect effect = cgGetNamedEffect( context, "simpleEffect" );


ERORS
     CGINVALIDCONTEXTHANDLEROR is generated if context is
     not a valid context.

HISTORY
     cgGetNamedEffect was introduced in Cg 1.5.

SEE ALSO
     cgGetEffectName, cgSetEffectName, cgGetFirstEffect,
     cgGetNextEffect












Cg Toolkit 2.1            Last change:                          1



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™