NAME
    cgGetErrorCallback, cgSetErrorCallback - get and set the error callback

SYNOPSIS
      #include <Cg/cg.h>

      typedef void (*CGerrorCallbackFunc)(void);

      void cgSetErrorCallback( CGerrorCallbackFunc func );
      CGerrorCallbackFunc cgGetErrorCallback( void );

PARAMETERS
    func    A function pointer to the callback function.

DESCRIPTION
    cgSetErrorCallback sets a callback function that will be called every
    time an error occurrs. The callback function is not passed any
    parameters. It is assumed that the callback function will call
    cgGetError to obtain the current error. To disable the callback
    function, cgSetErrorCallback may be called with NULL.

    cgGetErrorCallback returns the currently set callback function. NULL
    will be returned if no callback function is set.

    The following is an example of how to set and use an error callback :

      void MyErrorCallback( void ) {
        int Error = cgGetError();
        fprintf(stderr, "ERROR : %s\n", cgGetErrorString(Error));
      }

      void main(int argc, char *argv[])
       {
        cgSetErrorCallback(MyErrorCallback);

        /* Do stuff */
       }

ERRORS
SEE ALSO
    the cgGetError manpage, the cgGetErrorString manpage

