cgGetNumProgramDomains(3)

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