NAME

cgGetParameterValues - get a program parameter's values

SYNOPSIS

  #include <Cg/cg.h>

  const double *cgGetParameterValues(CGparameter param, 
                                     CGenum value_type,
                                     int *nvalues);

PARAMETERS

param

Specifies the program parameter.

value_type

Determines what type of value to return. Valid enumerants are :

  • CG_CONSTANT
  • Returns the constant values for parameters that have constant variability. See the "cgGetParameterVariability" document for more information.

  • CG_DEFAULT
  • Returns the default values for a uniform parameter.

DESCRIPTION

cgGetParameterValues allows the application to retrieve default or constant values from uniform parameters.

RETURN VALUES

Returns a pointer to an array of double values. The number of values in the array is returned via the nvalues parameter.

If no values are available, NULL will be returned and nvalues will be 0.

ERRORS

CG_INVALID_PARAM_HANDLE_ERROR is generated if the handle param is invalid.

CG_INVALID_PARAMETER_ERROR is generated if nvalues is NULL.

CG_INVALID_ENUMERANT_ERROR if the value_type parameter is invalid.

SEE ALSO

cgGetParameterVariability