cgGetNumProgramDomains

> # NAME

> cgGetNumProgramDomains - get the number of domains in a combined program

> # SYNOPSIS

>       #include <Cg/cg.h>

>       int cgGetNumProgramDomains( CGprogram program );

> # PARAMETERS

> program

>   The combined program object to be queried.

> # RETURN VALUES

> Returns the number of domains in the combined program.

> Returns 0 if an error occurs.

> # DESCRIPTION

> cgGetNumProgramDomains returns the number of domains in a combined program. For example, if the combined program contains a vertex program and a fragment program, then cgGetNumProgramDomains will return 2. cgGetNumProgramDomains returns 1 for non-combined programs.

> # EXAMPLES

> CGprogram combined = cgCombinePrograms2( prog1, prog2 ); int numDomains = cgGetNumProgramDomains( combined );

> if ( numDomains != 2 ) { /* something is bad wrong */ }

> # ERRORS

> CG_INVALID_PROGRAM_HANDLE_ERROR is generated if program is not a valid program handle.

> # HISTORY

> cgGetNumProgramDomains was introduced in Cg 1.5.

> # SEE ALSO

> cgGetProfileDomain, cgGetProgramDomainProfile