> ## 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 program.

> Returns 0 if an error occurs.

> ## Description

> cgGetNumProgramDomains returns the number of domains in a combined program. For example, if the combined program contained a vertex program and a fragment program, cgGetNumProgramDomains will return 2.

> cgGetNumProgramDomains will always return 1 for a non-combined program.

> ## Examples

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

> ## 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, cgGetProgramDomainProgram