> ## Name

> cgGLSetContextOptimalOptions - set the implicit compiler optimization options for a profile

> ## Synopsis

>     #include <Cg/cgGL.h>

>     void cgGLSetContextOptimalOptions( CGontext context, CGprofile profile );

> ## Parameters

> context
>   The context for which the optimal options will be set.
> profile
>   The profile for which the optimal options will be set.

> ## Return Values

> None.

> ## Description

> cgGLSetContextOptimalOptions sets implicit compiler arguments that are appended to the argument list passed to cgCreateProgram. The arguments are chosen based on the the available compiler arguments, GPU, and driver.

> The arguments will be appended to the argument list every time cgCreateProgram is called until the CGcontext is destroyed.

> cgGLSetContextOptimalOptions needs to be called for each CGcontext.

> Note: cgGLSetContextOptimalOptions replaces cgGLSetContextOptimalOptions.

> ## Examples

> to-be-written

> ## Errors

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

> CG_INVALID_PROFILE_ERROR is generated if profile is not a supported OpenGL profile.

> ## History

> cgGLSetContextOptimalOptions was introduced in Cg 3.1.

> ## See Also

> cgGLGetContextOptimalOptions, cgCreateProgram