NAME
    cgEvaluateProgram - evaluates a Cg program on the CPU

SYNOPSIS
      #include <Cg/cg.h>

      void cgEvaluateProgram(CGprogram prog, float *buf, int ncomps, int nx, int ny, int nz);

PARAMETERS
    technique
            Specifies the program handle.

    buf     Buffer in which to store the results of program evaluation.

    ncomps  Number of components to store for each returned program value

    nx      Number of points at which to evaluate the program in the x
            direction

    ny      Number of points at which to evaluate the program in the y
            direction

    nz      Number of points at which to evaluate the program in the z
            direction

DESCRIPTION
    cgEvaluateProgram evaluates a Cg program at a set of regularly spaced
    points in one, two, or three dimensions. The program must have been
    compiled with the CG_PROFILE_GENERIC profile. The value returned from
    the program via the COLOR semantic is stored in the given buffer for
    each evaluation point, and any varying parameters to the program with
    POSITION semantic take on the (x,y,z) position over the range zero to
    one at which the program is evaluated at each point. The PSIZE semantic
    can be used to find the spacing between evaluating points.

    The total size of the buffer buf should be equal to ncomps*nx*ny*nz.

ERRORS
    CG_INVALID_PROGRAM_HANDLE_ERROR is generated if program does not refer
    to a valid program.

    CG_INVALID_PROFILE_ERROR is generated if program's profile is not
    CG_PROFILE_GENERIC.

    CG_INVALID_PARAMETER_ERROR is generated if buf is NULL, any of nx, ny,
    or nz is less than zero, or ncomps is not 0, 1, 2, or 3.

SEE ALSO
    the cgCreateProgram manpage, the cgCreateProgramFromFile manpage, the
    cgCreateProgramFromEffect manpage.

