NAME
    cgSetAutoCompile - sets the auto-compile mode for a context

SYNOPSIS
      #include <Cg/cg.h>

      void cgSetAutoCompile( CGcontext context,
                             CGenum autoCompileMode );

PARAMETERS
    context The context.

    autoCompileMode
            The auto-compile mode to which to set context. Must be one of
            the following :

            * CG_COMPILE_MANUAL
            * CG_COMPILE_IMMEDIATE
            * CG_COMPILE_LAZY
RETURN VALUES
    None.

DESCRIPTION
    cgSetAutoCompile sets the auto compile mode for a given context. By
    default, programs are immediately recompiled when they enter an
    uncompiled state. This may happen for a variety of reasons including :

    * Setting the value of a literal parameter.
    * Resizing arrays.
    * Binding structs to interface parameters.
    autoCompileMode may be one of the following three enumerants :

    * CG_COMPILE_IMMEDIATE
        CG_COMPILE_IMMEDIATE will force recompilation automatically and
        immediately when a program enters an uncompiled state. This is the
        default mode.

    * CG_COMPILE_MANUAL
        With this method the application is responsible for manually
        recompiling a program. It may check to see if a program requires
        recompilation with the entry point cgIsProgramCompiled.
        cgCompileProgram can then be used to force compilation.

    * CG_COMPILE_LAZY
        This method is similar to CG_COMPILE_IMMEDIATE but will delay
        program recompilation until the program object code is needed. The
        advantage of this method is the reduction of extraneous
        recompilations. The disadvantage is that compile time errors will
        not be encountered when the program is enters the uncompiled state
        but will instead be encountered at some later time.

EXAMPLES
    *to-be-written*

ERRORS
    CG_INVALID_CONTEXT_HANDLE_ERROR is generated if context is not a valid
    context.

    CG_INVALID_ENUMERANT_ERROR is generated if autoCompileMode is not
    CG_COMPILE_MANUAL, CG_COMPILE_IMMEDIATE, or CG_COMPILE_LAZY.

HISTORY
    cgSetAutoCompile was introduced in Cg 1.2.

SEE ALSO
    the cgCompileProgram manpage, the cgIsProgramCompiled manpage

