NAME
    cgGetLastListing, cgSetListing - get and set listing text

SYNOPSIS
      #include <Cg/cg.h>

      const char * cgGetLastListing( CGcontext context );
      void cgSetLastListing( CGhandle handle, const char *listing );

PARAMETERS
    context Specifies the context handle.

    handle  A CGcontext, CGstateassignment, CGeffect, CGpass, or CGtechnique
            belonging to the context whose listing text is to be set.

    listing Specifies the new listing text.

DESCRIPTION
    Each Cg context maintains a NULL-terminated string containing warning
    and error messages generated by the Cg compiler, state managers and the
    like. cgGetlastListing and cgSetlastListing allow applications and
    custom state managers to query and set the listing text.

    cgGetLastListing returns the currrent listing string for the given
    CGcontext. When a Cg runtime error occurs, applications can use the
    appropriate context's listing text in order to provide the user with
    detailed information about the error.

    cgSetLastListing is not normally used directly by applications. Instead,
    custom state managers can use cgSetLastListing to provide detailed
    technique validation error messages to the application.

RETURN VALUES
    cgGetListListing return a NULL-terminated string containing the current
    listing text. If no listing text is available, or the listing text
    string is empty, NULL is returned.

    In all cases, the pointer returned by cgGetLastListing is only
    guaranteed to be valid until the next Cg entry point not related to
    error reporting is called. For example, calls to cgCreateProgram,
    cgCompileProgram, cgCreateEffect, or cgValidateEffect will invalidate
    any previously-returned listing pointer.

ERRORS
    CG_INVALID_PARAMETER_ERROR is generated if context or handle are invalid
    handles.

SEE ALSO
    the cgCreateContext manpage, the cgSetErrorHandler manpage

