cgGLUnloadProgram(3)

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_FALSE

ERRORS
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
cgGLLoadProgram, cgGLIsProgramLoaded, cgDestroyProgram