cgGetProgramContext
Keywords: cgGetProgramContext, NVIDIA, NVIDIA Cg Toolkit, Cg Toolkit, Shader, Shader Programming, GPU Shader Programming, GPU Program

> ## Name

> cgGetProgramContext - get a programs parent context

> ## Synopsis

>     #include <Cg/cg.h>

>     CGcontext cgGetProgramContext( CGprogram program );

> ## Parameters

> program
>   The program.

> ## Return Values

> Returns a CGcontext handle to the parent context.

> Returns NULL if an error occurs.

> ## Description

> cgGetProgramContext allows the application to retrieve a handle to the context to which a given program belongs.

> ## Examples

> to-be-written

> ## Errors

> CG_INVALID_PROGRAM_HANDLE_ERROR is generated if program is not a valid program handle.

> ## History

> cgGetProgramContext was introduced in Cg 1.1.

> ## See Also

> cgCreateProgram, cgCreateContext