MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Cg Core Runtime API                      cgSetParameterValueir(3)



NAME
     cgSetParameterValueir - set the value of any numeric
     parameter

SYNOPSIS
       #include 

       void cgSetParameterValueir( CGparameter param,
                                   int nelements,
                                   const int * v );


PARAMETERS
     param   The program parameter whose value will be set.

     nelements
             The number of elements in array v.

     v       Source buffer from which the parameter values will
             be read.

RETURN VALUES
     None.

DESCRIPTION
     cgSetParameterValueir allows the application to set 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.

     Any matrices referenced by param to be initialized in row-
     major order.

     If v is smaller than the total number of values in the given
     source parameter, CGNOTENOUGHDATAEROR 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;


EXAMPLES
     to-be-written





Cg Toolkit 2.1            Last change:                          1






Cg Core Runtime API                      cgSetParameterValueir(3)



ERORS
     CGINVALIDPARAMHANDLEROR is generated if param is not a
     valid parameter.

     CGINVALIDPARAMETEREROR is generated if param is a
     varying input to a fragment program.

     CGINVALIDPOINTEREROR is generated if v is NUL.

     CGNOTENOUGHDATAEROR is generated if nelements is less
     than the total size of param.

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

HISTORY
     cgSetParameterValueir was introduced in Cg 1.4.

SEE ALSO
     cgSetParameterValue, cgGetParameterRows,
     cgGetParameterColumns, cgGetArrayTotalSize,
     cgGetParameterValue

































Cg Toolkit 2.1            Last change:                          2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™