Name
cgGLUnloadProgram - destroy the OpenGL shader object associated with a program
Synopsis
#include <Cg/cgGL.h> void cgGLUnloadProgram( CGprogram program );Parameters
- program
- The program for which to destroy the shader object. The CGprogram handle is still valid after this call.
Return Values
None.
Description
cgGLUnloadProgram destroys the OpenGL shader object for a program.
This call does not destroy the CGprogram itself, only the associated GL shader object. Use cgDestroyProgram to free the CGprogram itself. Also note that freeing a CGprogram using the core runtime implicitly calls this routine to avoid resource leaks.
Examples
// prog is a CGprogram initialized elsewhere ... cgGLUnloadProgram(prog); CGbool loaded = cgGLIsProgramLoaded(prog); // loaded == CG_FALSEErrors
CG_INVALID_PROGRAM_HANDLE_ERROR is generated if program is not a valid program handle.
History
cgGLUnloadProgram was introduced in Cg 2.1.
See Also