> ## Name

> cgGLGetProgramID - get the OpenGL program ID associated with a program

> ## Synopsis

>     #include <Cg/cgGL.h>

>     GLuint cgGLGetProgramID( CGprogram program );

> ## Parameters

> program
>   The program for which the OpenGL program ID will be retrieved.

> ## Return Values

> Returns a GLuint associated with the GL program object for profiles that use program object.

> Returns 0 for profiles that do not have OpenGL programs (e.g. fp20).

> ## Description

> cgGLGetProgramID returns the identifier to the OpenGL program object associated with program. cgGLGetProgramID should not be called before cgGLLoadProgram is called.

> ## Examples

> to-be-written

> ## Errors

> CG_INVALID_PROFILE_ERROR is generated if program's profile is not a supported OpenGL profile.

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

> ## History

> cgGLGetProgramID was introduced in Cg 1.2.

> ## See Also

> cgGLLoadProgram, cgGLBindProgram