cgSetParameterVariability(3)

NAME
cgSetParameterVariability - set a parameter's variability

SYNOPSIS
  #include <Cg/cg.h>
  void cgSetParameterVariability( CGparameter param,
                                  CGenum vary );

PARAMETERS
The parameter. The variability to which param will be set.

RETURN VALUES
None.

DESCRIPTION
cgSetParameterVariability allows the application to change the variability of a parameter.

Currently parameters may not be changed to or from CG_VARYING variability. However parameters of CG_UNIFORM and CG_LITERAL variability may be changed.

Valid values for vary include : A uniform parameter is one whose value does not change with each invocation of a program, but whose value can change between groups of program invocations. A literal parameter is folded out at compile time. Making a uniform parameter literal will often make a program more efficient at the expense of requiring a compile every time the value is set. By default, the variability of a parameter will be overridden by the a source parameter connected to it unless it is changed with cgSetParameterVariability. If it is set to CG_DEFAULT it will restore the default state of assuming the source parameters variability.

EXAMPLES
to-be-written

ERRORS
CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.

CG_INVALID_ENUMERANT_ERROR is generated if vary is not CG_UNIFORM, CG_LITERAL, or CG_DEFAULT.

CG_INVALID_PARAMETER_VARIABILITY_ERROR is generated if the parameter could not be changed to the variability indicated by vary.

CG_INVALID_PARAMETER_TYPE_ERROR is generated if vary is CG_LITERAL and param is a not a numeric parameter.

HISTORY
cgSetParameterVariability was introduced in Cg 1.2.

SEE ALSO
the cgGetParameterVariability manpage