cgGetFirstPass
Keywords: cgGetFirstPass, NVIDIA, NVIDIA Cg Toolkit, Cg Toolkit, Shader, Shader Programming, GPU Shader Programming, GPU Program

> ## Name

> cgGetFirstPass - get the first pass in a technique

> ## Synopsis

>     #include <Cg/cg.h>

>     CGpass cgGetFirstPass( CGtechnique tech );

> ## Parameters

> tech
>   The technique from which to retrieve the first pass.

> ## Return Values

> Returns the first CGpass object in tech.

> Returns NULL if tech contains no passes.

> ## Description

> cgGetFirstPass is used to begin iteration over all of the passes contained within a technique. See cgGetNextPass for more information.

> ## Examples

>     CGpass pass = cgGetFirstPass( tech );
>     while ( pass )
>     {
>       /* Do stuff with pass */
>       leaf = cgGetNextPass( pass );
>     }

> ## Errors

> CG_INVALID_TECHNIQUE_HANDLE_ERROR is generated if tech is not a valid technique.

> ## History

> cgGetFirstPass was introduced in Cg 1.4.

> ## See Also

> cgGetNextPass, cgGetNamedPass, cgIsPass, cgGetFirstPassAnnotation