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 :

autoCompileMode may be one of the following three enumerants :

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

cgCompileProgram, cgIsProgramCompiled