NAME
    cgCreateProgramFromEffect - generate a new program object from an effect

SYNOPSIS
      #include <Cg/cg.h>

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

PARAMETERS
    effect  Specifies the effect with the program source code from which to
            create the program.

    profile The enumerant for the profile for the program.

    entry   The entry point to the program in the Cg source. If set to NULL
            this will default to "main".

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

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

RETURN VALUES
    Returns a CGprogram handle on success.

    Returns NULL if any error occurs.

ERRORS
    CG_INVALID_EFFECT_HANDLE_ERROR is generated if the 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 failed.

SEE ALSO
    the cgCreateProgram manpage, and the cgCreateProgramFromFile manpage

