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

SYNOPSIS
      #include <Cg/cg.h>

      void cgSetAutoCompile(CGcontext ctx, CGenum flag);

PARAMETERS
    ctx     Specifies the context.

    flag    The auto-compile mode to set the ctx to. Must be one of the
            following :

            * CG_COMPILE_MANUAL
            * CG_COMPILE_IMMEDIATE
            * CG_COMPILE_LAZY
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.
    flag 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.

ERRORS
    CG_INVALID_CONTEXT_HANDLE_ERROR is generated if ctx is invalid.

    CG_INVALID_ENUMERANT_ERROR is generated if flag is invalid.

SEE ALSO
    the cgCompileProgram manpage, and the cgIsProgramCompiled manpage

