> # NAME

> cgCreateProgramFromEffect - create a program object from an effect

> # SYNOPSIS

>       #include <Cg/cg.h>

>       CGprogram cgCreateProgramFromEffect( CGeffect effect,
>                                            CGprofile profile,
>                                            const char * entry,
>                                            const char ** args );

> # PARAMETERS

> effect

>   The effect containing the program source code from which to create the program.

> profile

>   The profile enumerant for the program.

> entry

>   The entry point to the program in the Cg source. If NULL, the entry point defaults to "main".

> args

>   If args is not NULL it is assumed to be an array of NULL-terminated strings that will be passed directly to the compiler as arguments. The last value of the array must be a NULL.

> # RETURN VALUES

> Returns a CGprogram handle on success.

> Returns NULL if an error occurs.

> # DESCRIPTION

> cgCreateProgramFromEffect generates a new CGprogram object and adds it to the effect's Cg context.

> # EXAMPLES

> to-be-written

> # ERRORS

> CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.

> CG_UNKNOWN_PROFILE_ERROR is generated if profile is not a supported profile.

> CG_COMPILER_ERROR is generated if compilation fails.

> # HISTORY

> cgCreateProgramFromEffect was introduced in Cg 1.4.

> # SEE ALSO

> cgCreateProgram, cgCreateProgramFromFile