NAME
    cgGetParameterValue - get the value of any numeric parameter

SYNOPSIS
      #include <Cg/cg.h>

      /* type may be int, float, or double */
      int cgGetParameterValue{i,f,d}{r,c}(CGparameter param, 
                                          int nvals, type *v);

PARAMETERS
    param   Specifies the program parameter whose value will be retrieved.

    nvals   The length of the v array, in number of elements.

    v       Destination buffer to which the parameter values will be
            written.

DESCRIPTION
    cgGetParameterValue allows the application to get the value of any
    numeric parameter or parameter array.

    The given parameter must be a scalar, vector, matrix, or a
    (possibly-multidimensional) array of scalars, vectors, or matrices.

    There are versions of each function that take int, float or double
    values signified by the i, f or d in the function name.

    There are versions of each function that will cause any matrices
    referenced by param to be copied in either row-major or column-major
    order, as signified by the r or c in the function name.

    For example, cgGetParameterValueic retrieves the values of the given
    parameter using the supplied array of integer data, and copies matrix
    data in column-major order.

    If v is smaller than the total number of values in the given source
    parameter, CG_NOT_ENOUGH_DATA_ERROR is generated.

    The total number of values in a parameter, ntotal, may be computed as
    follow:

                int nrows = cgGetParameterRows(param);
                int ncols = cgGetParameterColumns(param);
                int asize = cgGetArrayTotalSize(param);
                int ntotal = nrows*ncols;
                if (asize > 0) ntotal *= asize;

RETURN VALUES
    The total number of values written to v is returned.

ERRORS
    CG_INVALID_PARAM_HANDLE_ERROR is generated if the handle param is
    invalid.

    CG_INVALID_POINTER_ERROR is generated if v is NULL.

    CG_NOT_ENOUGH_DATA_ERROR is generated if nvalues is less than the total
    size of param.

    CG_NON_NUMERIC_PARAMETER_ERROR is generated if param is of a non-numeric
    type.

SEE ALSO
    the cgGetParameterRows manpage, the cgGetParameterColumns manpage, the
    cgGetArrayTotalSize manpage, and the cgSetParameterValue manpage

